Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
8d70ab27
Commit
8d70ab27
authored
15 years ago
by
Christian Kamm
Browse files
Options
Downloads
Patches
Plain Diff
QmlJS: Clean paths in the Snapshot.
To solve import resolution issues on windows. Reviewed-by: Roberto Raggi
parent
80fa3216
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libs/qmljs/qmljsdocument.cpp
+18
-3
18 additions, 3 deletions
src/libs/qmljs/qmljsdocument.cpp
src/libs/qmljs/qmljsdocument.h
+3
-8
3 additions, 8 deletions
src/libs/qmljs/qmljsdocument.h
with
21 additions
and
11 deletions
src/libs/qmljs/qmljsdocument.cpp
+
18
−
3
View file @
8d70ab27
...
...
@@ -47,10 +47,10 @@ Document::Document(const QString &fileName)
,
_isQmlDocument
(
false
)
,
_documentRevision
(
0
)
,
_parsedCorrectly
(
false
)
,
_fileName
(
fileName
)
,
_fileName
(
QDir
::
cleanPath
(
fileName
)
)
{
QFileInfo
fileInfo
(
fileName
);
_path
=
fileInfo
.
absolutePath
();
_path
=
QDir
::
cleanPath
(
fileInfo
.
absolutePath
()
)
;
// ### Should use mime type
if
(
fileInfo
.
suffix
()
==
QLatin1String
(
"qml"
)
...
...
@@ -258,7 +258,7 @@ void Snapshot::insert(const Document::Ptr &document)
void
Snapshot
::
insertLibraryInfo
(
const
QString
&
path
,
const
LibraryInfo
&
info
)
{
_libraries
.
insert
(
path
,
info
);
_libraries
.
insert
(
QDir
::
cleanPath
(
path
)
,
info
);
}
Document
::
Ptr
Snapshot
::
documentFromSource
(
const
QString
&
code
,
...
...
@@ -314,3 +314,18 @@ QMap<QString, Document::Ptr> Snapshot::componentsDefinedByImportedDocuments(cons
return
result
;
}
Document
::
Ptr
Snapshot
::
document
(
const
QString
&
fileName
)
const
{
return
_documents
.
value
(
QDir
::
cleanPath
(
fileName
));
}
QList
<
Document
::
Ptr
>
Snapshot
::
documentsInDirectory
(
const
QString
&
path
)
const
{
return
_documentsByPath
.
values
(
QDir
::
cleanPath
(
path
));
}
LibraryInfo
Snapshot
::
libraryInfo
(
const
QString
&
path
)
const
{
return
_libraries
.
value
(
QDir
::
cleanPath
(
path
));
}
This diff is collapsed.
Click to expand it.
src/libs/qmljs/qmljsdocument.h
+
3
−
8
View file @
8d70ab27
...
...
@@ -149,14 +149,9 @@ public:
void
insert
(
const
Document
::
Ptr
&
document
);
void
insertLibraryInfo
(
const
QString
&
path
,
const
LibraryInfo
&
info
);
Document
::
Ptr
document
(
const
QString
&
fileName
)
const
{
return
_documents
.
value
(
fileName
);
}
QList
<
Document
::
Ptr
>
documentsInDirectory
(
const
QString
&
path
)
const
{
return
_documentsByPath
.
values
(
path
);
}
LibraryInfo
libraryInfo
(
const
QString
&
path
)
const
{
return
_libraries
.
value
(
path
);
}
Document
::
Ptr
document
(
const
QString
&
fileName
)
const
;
QList
<
Document
::
Ptr
>
documentsInDirectory
(
const
QString
&
path
)
const
;
LibraryInfo
libraryInfo
(
const
QString
&
path
)
const
;
Document
::
Ptr
documentFromSource
(
const
QString
&
code
,
const
QString
&
fileName
)
const
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment