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
e84de32a
Commit
e84de32a
authored
Dec 01, 2009
by
Roberto Raggi
Browse files
Use resultsReadyAt.
parent
2a9ca651
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cppfindreferences.cpp
View file @
e84de32a
...
...
@@ -67,7 +67,7 @@ CppFindReferences::CppFindReferences(CppTools::CppModelManagerInterface *modelMa
_resultWindow
(
ExtensionSystem
::
PluginManager
::
instance
()
->
getObject
<
Find
::
SearchResultWindow
>
())
{
m_watcher
.
setPendingResultsLimit
(
1
);
connect
(
&
m_watcher
,
SIGNAL
(
resultReadyAt
(
int
)),
this
,
SLOT
(
displayResult
(
int
)));
connect
(
&
m_watcher
,
SIGNAL
(
result
s
ReadyAt
(
int
,
int
)),
this
,
SLOT
(
displayResult
s
(
int
,
int
)));
connect
(
&
m_watcher
,
SIGNAL
(
finished
()),
this
,
SLOT
(
searchFinished
()));
}
...
...
@@ -333,14 +333,16 @@ void CppFindReferences::onReplaceButtonClicked(const QString &text,
_resultWindow
->
hide
();
}
void
CppFindReferences
::
displayResult
(
int
index
)
void
CppFindReferences
::
displayResult
s
(
int
first
,
int
last
)
{
Usage
result
=
m_watcher
.
future
().
resultAt
(
index
);
_resultWindow
->
addResult
(
result
.
path
,
result
.
line
,
result
.
lineText
,
result
.
col
,
result
.
len
);
for
(
int
index
=
first
;
index
!=
last
;
++
index
)
{
Usage
result
=
m_watcher
.
future
().
resultAt
(
index
);
_resultWindow
->
addResult
(
result
.
path
,
result
.
line
,
result
.
lineText
,
result
.
col
,
result
.
len
);
}
}
void
CppFindReferences
::
searchFinished
()
...
...
src/plugins/cpptools/cppfindreferences.h
View file @
e84de32a
...
...
@@ -68,7 +68,7 @@ public:
void
renameUsages
(
CPlusPlus
::
Symbol
*
symbol
);
private
Q_SLOTS
:
void
displayResult
(
int
);
void
displayResult
s
(
int
first
,
int
last
);
void
searchFinished
();
void
openEditor
(
const
Find
::
SearchResultItem
&
item
);
void
onReplaceButtonClicked
(
const
QString
&
text
,
const
QList
<
Find
::
SearchResultItem
>
&
items
);
...
...
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