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
Tobias Hunger
qt-creator
Commits
420b09e8
Commit
420b09e8
authored
Oct 12, 2009
by
Roberto Raggi
Browse files
Expose CppModelManagerInterface::workingCopy()
parent
db145339
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cppfindreferences.cpp
View file @
420b09e8
...
...
@@ -28,7 +28,7 @@
**************************************************************************/
#include "cppfindreferences.h"
#include "cppmodelmanager.h"
#include "cppmodelmanager
interface
.h"
#include "cpptoolsconstants.h"
#include <texteditor/basetexteditor.h>
...
...
@@ -452,7 +452,7 @@ private:
}
// end of anonymous namespace
CppFindReferences
::
CppFindReferences
(
CppModelManager
*
modelManager
)
CppFindReferences
::
CppFindReferences
(
CppTools
::
CppModelManager
Interface
*
modelManager
)
:
_modelManager
(
modelManager
),
_resultWindow
(
ExtensionSystem
::
PluginManager
::
instance
()
->
getObject
<
Find
::
SearchResultWindow
>
())
{
...
...
@@ -614,7 +614,7 @@ void CppFindReferences::findAll_helper(Symbol *symbol)
_resultWindow
->
popup
(
true
);
const
Snapshot
snapshot
=
_modelManager
->
snapshot
();
const
QMap
<
QString
,
QString
>
wl
=
_modelManager
->
buildW
orkingCopy
List
();
const
QMap
<
QString
,
QString
>
wl
=
_modelManager
->
w
orkingCopy
();
Core
::
ProgressManager
*
progressManager
=
Core
::
ICore
::
instance
()
->
progressManager
();
...
...
src/plugins/cpptools/cppfindreferences.h
View file @
420b09e8
...
...
@@ -43,16 +43,16 @@ namespace Find {
}
// end of namespace Find
namespace
CppTools
{
namespace
Internal
{
class
CppModelManagerInterface
;
class
CppModelManager
;
namespace
Internal
{
class
CppFindReferences
:
public
QObject
{
Q_OBJECT
public:
CppFindReferences
(
CppModelManager
*
modelManager
);
CppFindReferences
(
CppModelManager
Interface
*
modelManager
);
virtual
~
CppFindReferences
();
QList
<
int
>
references
(
CPlusPlus
::
Symbol
*
symbol
,
...
...
@@ -76,7 +76,7 @@ private:
void
findAll_helper
(
CPlusPlus
::
Symbol
*
symbol
);
private:
QPointer
<
CppModelManager
>
_modelManager
;
QPointer
<
CppModelManager
Interface
>
_modelManager
;
Find
::
SearchResultWindow
*
_resultWindow
;
QFutureWatcher
<
Utils
::
FileSearchResult
>
m_watcher
;
};
...
...
src/plugins/cpptools/cppmodelmanager.cpp
View file @
420b09e8
...
...
@@ -793,6 +793,11 @@ QMap<QString, QString> CppModelManager::buildWorkingCopyList()
return
workingCopy
;
}
QMap
<
QString
,
QString
>
CppModelManager
::
workingCopy
()
const
{
return
const_cast
<
CppModelManager
*>
(
this
)
->
buildWorkingCopyList
();
}
void
CppModelManager
::
updateSourceFiles
(
const
QStringList
&
sourceFiles
)
{
(
void
)
refreshSourceFiles
(
sourceFiles
);
}
...
...
src/plugins/cpptools/cppmodelmanager.h
View file @
420b09e8
...
...
@@ -73,6 +73,7 @@ public:
virtual
~
CppModelManager
();
virtual
void
updateSourceFiles
(
const
QStringList
&
sourceFiles
);
virtual
QMap
<
QString
,
QString
>
workingCopy
()
const
;
virtual
QList
<
ProjectInfo
>
projectInfos
()
const
;
virtual
ProjectInfo
projectInfo
(
ProjectExplorer
::
Project
*
project
)
const
;
...
...
@@ -92,8 +93,6 @@ public:
CppEditorSupport
*
editorSupport
(
TextEditor
::
ITextEditor
*
editor
)
const
{
return
m_editorSupport
.
value
(
editor
);
}
QMap
<
QString
,
QString
>
buildWorkingCopyList
();
void
emitDocumentUpdated
(
CPlusPlus
::
Document
::
Ptr
doc
);
void
stopEditorSelectionsUpdate
()
...
...
@@ -132,6 +131,8 @@ private Q_SLOTS:
void
updateEditorSelections
();
private:
QMap
<
QString
,
QString
>
buildWorkingCopyList
();
QStringList
projectFiles
()
{
ensureUpdated
();
...
...
src/plugins/cpptools/cppmodelmanagerinterface.h
View file @
420b09e8
...
...
@@ -86,6 +86,7 @@ public:
virtual
void
GC
()
=
0
;
virtual
void
updateSourceFiles
(
const
QStringList
&
sourceFiles
)
=
0
;
virtual
QMap
<
QString
,
QString
>
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