Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
8caff494
Commit
8caff494
authored
May 10, 2010
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify Process.
parent
dca2e821
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
src/plugins/cpptools/cppmodelmanager.cpp
src/plugins/cpptools/cppmodelmanager.cpp
+19
-20
No files found.
src/plugins/cpptools/cppmodelmanager.cpp
View file @
8caff494
...
...
@@ -270,44 +270,43 @@ class Process: public std::unary_function<Document::Ptr, void>
{
QPointer
<
CppModelManager
>
_modelManager
;
Snapshot
_snapshot
;
CppModelManager
::
WorkingCopy
_workingCopy
;
Document
::
Ptr
_doc
;
Document
::
CheckMode
_mode
;
public:
Process
(
QPointer
<
CppModelManager
>
modelManager
,
Snapshot
snapshot
,
Document
::
Ptr
doc
,
const
Snapshot
&
snapshot
,
const
CppModelManager
::
WorkingCopy
&
workingCopy
)
:
_modelManager
(
modelManager
),
_snapshot
(
snapshot
),
_workingCopy
(
workingCopy
)
{
}
void
operator
()(
Document
::
Ptr
doc
)
_doc
(
doc
),
_mode
(
Document
::
FastCheck
)
{
_doc
=
doc
;
Document
::
CheckMode
mode
=
Document
::
FastCheck
;
if
(
_workingCopy
.
contains
(
doc
->
fileName
()))
mode
=
Document
::
FullCheck
;
if
(
workingCopy
.
contains
(
_doc
->
fileName
()))
_mode
=
Document
::
FullCheck
;
}
doc
->
check
(
mode
);
void
operator
()()
{
_doc
->
check
(
_mode
);
if
(
mode
==
Document
::
FullCheck
)
{
if
(
_
mode
==
Document
::
FullCheck
)
{
// run the binding pass
NamespaceBindingPtr
ns
=
bind
(
doc
,
_snapshot
);
NamespaceBindingPtr
ns
=
bind
(
_
doc
,
_snapshot
);
// check for undefined symbols.
CheckUndefinedSymbols
checkUndefinedSymbols
(
doc
);
CheckUndefinedSymbols
checkUndefinedSymbols
(
_
doc
);
checkUndefinedSymbols
.
setGlobalNamespaceBinding
(
ns
);
checkUndefinedSymbols
(
doc
->
translationUnit
()
->
ast
());
// ### FIXME
checkUndefinedSymbols
(
_
doc
->
translationUnit
()
->
ast
());
// ### FIXME
}
doc
->
releaseTranslationUnit
();
_
doc
->
releaseTranslationUnit
();
if
(
_modelManager
)
_modelManager
->
emitDocumentUpdated
(
doc
);
// ### TODO: compress
_modelManager
->
emitDocumentUpdated
(
_
doc
);
// ### TODO: compress
}
};
}
// end of anonymous namespace
...
...
@@ -600,9 +599,9 @@ void CppPreprocessor::sourceNeeded(QString &fileName, IncludeType type, unsigned
m_todo
.
remove
(
fileName
);
#ifndef ICHECK_BUILD
Process
process
(
m_modelManager
,
snapshot
,
m_workingCopy
);
Process
process
(
m_modelManager
,
doc
,
snapshot
,
m_workingCopy
);
process
(
doc
);
process
();
(
void
)
switchDocument
(
previousDoc
);
#else
...
...
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