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
24d0f694
Commit
24d0f694
authored
Jun 21, 2010
by
Christian Kamm
Browse files
QmlJS: Remove unused functions from Snapshot.
Reviewed-by: Erik Verbruggen
parent
aa4d7417
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/libs/qmljs/qmljsdocument.cpp
View file @
24d0f694
...
...
@@ -371,47 +371,6 @@ Document::Ptr Snapshot::documentFromSource(const QString &code,
return
newDoc
;
}
QList
<
Document
::
Ptr
>
Snapshot
::
importedDocuments
(
const
Document
::
Ptr
&
doc
,
const
QString
&
importPath
)
const
{
// ### TODO: maybe we should add all imported documents in the parse Document::parse() method, regardless of whether they're in the path or not.
QList
<
Document
::
Ptr
>
result
;
QString
docPath
=
doc
->
path
();
docPath
+=
QLatin1Char
(
'/'
);
docPath
+=
importPath
;
docPath
=
QDir
::
cleanPath
(
docPath
);
foreach
(
Document
::
Ptr
candidate
,
_documents
)
{
if
(
candidate
==
doc
)
continue
;
// ignore this document
else
if
(
candidate
->
isJSDocument
())
continue
;
// skip JS documents
if
(
candidate
->
path
()
==
doc
->
path
()
||
candidate
->
path
()
==
docPath
)
result
.
append
(
candidate
);
}
return
result
;
}
QMap
<
QString
,
Document
::
Ptr
>
Snapshot
::
componentsDefinedByImportedDocuments
(
const
Document
::
Ptr
&
doc
,
const
QString
&
importPath
)
const
{
QMap
<
QString
,
Document
::
Ptr
>
result
;
const
QString
docPath
=
doc
->
path
()
+
'/'
+
importPath
;
foreach
(
Document
::
Ptr
candidate
,
*
this
)
{
if
(
candidate
==
doc
)
continue
;
if
(
candidate
->
path
()
==
doc
->
path
()
||
candidate
->
path
()
==
docPath
)
result
.
insert
(
candidate
->
componentName
(),
candidate
);
}
return
result
;
}
Document
::
Ptr
Snapshot
::
document
(
const
QString
&
fileName
)
const
{
return
_documents
.
value
(
QDir
::
cleanPath
(
fileName
));
...
...
src/libs/qmljs/qmljsdocument.h
View file @
24d0f694
...
...
@@ -169,9 +169,6 @@ public:
Document
::
Ptr
documentFromSource
(
const
QString
&
code
,
const
QString
&
fileName
)
const
;
QList
<
Document
::
Ptr
>
importedDocuments
(
const
Document
::
Ptr
&
doc
,
const
QString
&
importPath
)
const
;
QMap
<
QString
,
Document
::
Ptr
>
componentsDefinedByImportedDocuments
(
const
Document
::
Ptr
&
doc
,
const
QString
&
importPath
)
const
;
};
}
// end of namespace Qml
...
...
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