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
ec769aea
Commit
ec769aea
authored
Jun 10, 2009
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Search in the editor buffers.
parent
3ae43daa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
10 deletions
+18
-10
src/plugins/cpptools/cppmodelmanager.cpp
src/plugins/cpptools/cppmodelmanager.cpp
+1
-1
src/plugins/cpptools/cppmodelmanager.h
src/plugins/cpptools/cppmodelmanager.h
+2
-2
src/plugins/cpptools/cppsemanticsearch.cpp
src/plugins/cpptools/cppsemanticsearch.cpp
+15
-7
No files found.
src/plugins/cpptools/cppmodelmanager.cpp
View file @
ec769aea
...
...
@@ -560,7 +560,7 @@ public:
LookupContext
lookupContext
(
Symbol
*
symbol
)
const
{
LookupContext
context
(
symbol
,
Document
::
create
(
"<none>"
),
_doc
,
_snapshot
);
LookupContext
context
(
symbol
,
Document
::
create
(
QLatin1String
(
"<none>"
)
),
_doc
,
_snapshot
);
return
context
;
}
...
...
src/plugins/cpptools/cppmodelmanager.h
View file @
ec769aea
...
...
@@ -89,6 +89,8 @@ public:
CppEditorSupport
*
editorSupport
(
TextEditor
::
ITextEditor
*
editor
)
const
{
return
m_editorSupport
.
value
(
editor
);
}
QMap
<
QString
,
QByteArray
>
buildWorkingCopyList
();
void
emitDocumentUpdated
(
CPlusPlus
::
Document
::
Ptr
doc
);
void
stopEditorSelectionsUpdate
()
...
...
@@ -117,8 +119,6 @@ private Q_SLOTS:
void
updateEditorSelections
();
private:
QMap
<
QString
,
QByteArray
>
buildWorkingCopyList
();
QStringList
projectFiles
()
{
ensureUpdated
();
...
...
src/plugins/cpptools/cppsemanticsearch.cpp
View file @
ec769aea
...
...
@@ -262,6 +262,7 @@ SemanticSearch *SearchFunctionCallFactory::create(QFutureInterface<Core::Utils::
static
void
semanticSearch_helper
(
QFutureInterface
<
Core
::
Utils
::
FileSearchResult
>
&
future
,
QPointer
<
CppModelManager
>
modelManager
,
QMap
<
QString
,
QByteArray
>
wl
,
SemanticSearchFactory
::
Ptr
factory
)
{
const
Snapshot
snapshot
=
modelManager
->
snapshot
();
...
...
@@ -273,14 +274,20 @@ static void semanticSearch_helper(QFutureInterface<Core::Utils::FileSearchResult
foreach
(
Document
::
Ptr
doc
,
snapshot
)
{
const
QString
fileName
=
doc
->
fileName
();
QFile
file
(
fileName
);
if
(
!
file
.
open
(
QFile
::
ReadOnly
))
continue
;
QByteArray
source
;
if
(
wl
.
contains
(
fileName
))
source
=
wl
.
value
(
fileName
);
else
{
QFile
file
(
fileName
);
if
(
!
file
.
open
(
QFile
::
ReadOnly
))
continue
;
const
QString
contents
=
QTextStream
(
&
file
).
readAll
();
// ### FIXME
source
=
snapshot
.
preprocessedCode
(
contents
.
toUtf8
(),
fileName
);
}
const
QString
contents
=
QTextStream
(
&
file
).
readAll
();
// ### FIXME
const
QByteArray
source
=
snapshot
.
preprocessedCode
(
contents
.
toUtf8
(),
fileName
);
Document
::
Ptr
newDoc
=
snapshot
.
documentFromSource
(
source
,
fileName
);
newDoc
->
parse
();
if
(
SemanticSearch
*
search
=
factory
->
create
(
future
,
newDoc
,
snapshot
))
{
search
->
setSource
(
source
);
...
...
@@ -295,5 +302,6 @@ static void semanticSearch_helper(QFutureInterface<Core::Utils::FileSearchResult
QFuture
<
Core
::
Utils
::
FileSearchResult
>
CppTools
::
Internal
::
semanticSearch
(
QPointer
<
CppModelManager
>
modelManager
,
SemanticSearchFactory
::
Ptr
factory
)
{
return
QtConcurrent
::
run
(
&
semanticSearch_helper
,
modelManager
,
factory
);
return
QtConcurrent
::
run
(
&
semanticSearch_helper
,
modelManager
,
modelManager
->
buildWorkingCopyList
(),
factory
);
}
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