Skip to content
GitLab
Menu
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
b168eec2
Commit
b168eec2
authored
Dec 15, 2009
by
Roberto Raggi
Browse files
Replaced the hardcoded QHash<QString, QString> with CppModelManagerInterface::WorkingCopy.
parent
730fd82a
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cppfindreferences.cpp
View file @
b168eec2
...
...
@@ -243,13 +243,13 @@ void CppFindReferences::findAll_helper(Symbol *symbol)
_resultWindow
->
popup
(
true
);
const
Snapshot
snapshot
=
_modelManager
->
snapshot
();
const
QHash
<
QString
,
QString
>
wl
=
_modelManager
->
workingCopy
();
const
CppTools
::
CppModelManagerInterface
::
WorkingCopy
workingCopy
=
_modelManager
->
workingCopy
();
Core
::
ProgressManager
*
progressManager
=
Core
::
ICore
::
instance
()
->
progressManager
();
QFuture
<
Usage
>
result
;
result
=
QtConcurrent
::
run
(
&
find_helper
,
w
l
,
snapshot
,
symbol
);
result
=
QtConcurrent
::
run
(
&
find_helper
,
w
orkingCopy
,
snapshot
,
symbol
);
m_watcher
.
setFuture
(
result
);
Core
::
FutureProgress
*
progress
=
progressManager
->
addTask
(
result
,
tr
(
"Searching..."
),
...
...
src/plugins/cpptools/cppmodelmanager.cpp
View file @
b168eec2
...
...
@@ -788,9 +788,9 @@ void CppModelManager::renameUsages(CPlusPlus::Symbol *symbol)
m_findReferences
->
renameUsages
(
symbol
);
}
QHash
<
QString
,
QString
>
CppModelManager
::
buildWorkingCopyList
()
CppModelManager
::
WorkingCopy
CppModelManager
::
buildWorkingCopyList
()
{
QHash
<
QString
,
QString
>
workingCopy
;
WorkingCopy
workingCopy
;
QMapIterator
<
TextEditor
::
ITextEditor
*
,
CppEditorSupport
*>
it
(
m_editorSupport
);
while
(
it
.
hasNext
())
{
it
.
next
();
...
...
@@ -814,7 +814,7 @@ QHash<QString, QString> CppModelManager::buildWorkingCopyList()
return
workingCopy
;
}
QHash
<
QString
,
QString
>
CppModelManager
::
workingCopy
()
const
CppModelManager
::
WorkingCopy
CppModelManager
::
workingCopy
()
const
{
return
const_cast
<
CppModelManager
*>
(
this
)
->
buildWorkingCopyList
();
}
...
...
@@ -869,7 +869,7 @@ QStringList CppModelManager::includesInPath(const QString &path) const
QFuture
<
void
>
CppModelManager
::
refreshSourceFiles
(
const
QStringList
&
sourceFiles
)
{
if
(
!
sourceFiles
.
isEmpty
()
&&
m_indexerEnabled
)
{
const
QHash
<
QString
,
QString
>
workingCopy
=
buildWorkingCopyList
();
const
WorkingCopy
workingCopy
=
buildWorkingCopyList
();
CppPreprocessor
*
preproc
=
new
CppPreprocessor
(
this
);
preproc
->
setRevision
(
++
m_revision
);
...
...
src/plugins/cpptools/cppmodelmanager.h
View file @
b168eec2
...
...
@@ -73,7 +73,7 @@ public:
virtual
~
CppModelManager
();
virtual
void
updateSourceFiles
(
const
QStringList
&
sourceFiles
);
virtual
QHash
<
QString
,
QString
>
workingCopy
()
const
;
virtual
WorkingCopy
workingCopy
()
const
;
virtual
QList
<
ProjectInfo
>
projectInfos
()
const
;
virtual
ProjectInfo
projectInfo
(
ProjectExplorer
::
Project
*
project
)
const
;
...
...
@@ -131,7 +131,7 @@ private Q_SLOTS:
void
updateEditorSelections
();
private:
QHash
<
QString
,
QString
>
buildWorkingCopyList
();
WorkingCopy
buildWorkingCopyList
();
QStringList
projectFiles
()
{
...
...
src/plugins/cpptools/cppmodelmanagerinterface.h
View file @
b168eec2
...
...
@@ -78,13 +78,15 @@ public:
QStringList
frameworkPaths
;
};
typedef
QHash
<
QString
,
QString
>
WorkingCopy
;
public:
CppModelManagerInterface
(
QObject
*
parent
=
0
)
:
QObject
(
parent
)
{}
virtual
~
CppModelManagerInterface
()
{}
static
CppModelManagerInterface
*
instance
();
virtual
QHash
<
QString
,
QString
>
workingCopy
()
const
=
0
;
virtual
WorkingCopy
workingCopy
()
const
=
0
;
virtual
CPlusPlus
::
Snapshot
snapshot
()
const
=
0
;
virtual
QList
<
ProjectInfo
>
projectInfos
()
const
=
0
;
...
...
Write
Preview
Supports
Markdown
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