Skip to content
GitLab
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
214e0bf3
Commit
214e0bf3
authored
Jul 12, 2010
by
con
Browse files
Add a instance() method to the search result window singleton.
parent
8c920ee0
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cppfindreferences.cpp
View file @
214e0bf3
...
...
@@ -148,7 +148,7 @@ public:
CppFindReferences
::
CppFindReferences
(
CppTools
::
CppModelManagerInterface
*
modelManager
)
:
QObject
(
modelManager
),
_modelManager
(
modelManager
),
_resultWindow
(
ExtensionSystem
::
PluginManager
::
instance
()
->
getObject
<
Find
::
SearchResultWindow
>
())
_resultWindow
(
Find
::
SearchResultWindow
::
instance
())
{
m_watcher
.
setPendingResultsLimit
(
1
);
connect
(
&
m_watcher
,
SIGNAL
(
resultsReadyAt
(
int
,
int
)),
this
,
SLOT
(
displayResults
(
int
,
int
)));
...
...
src/plugins/find/searchresultwindow.cpp
View file @
214e0bf3
...
...
@@ -211,8 +211,11 @@ namespace Internal {
using
namespace
Find
::
Internal
;
SearchResultWindow
*
SearchResultWindow
::
m_instance
=
0
;
SearchResultWindow
::
SearchResultWindow
()
:
d
(
new
SearchResultWindowPrivate
)
{
m_instance
=
this
;
d
->
m_widget
=
new
QStackedWidget
;
d
->
m_widget
->
setWindowTitle
(
displayName
());
...
...
@@ -271,6 +274,11 @@ SearchResultWindow::~SearchResultWindow()
delete
d
;
}
SearchResultWindow
*
SearchResultWindow
::
instance
()
{
return
m_instance
;
}
void
SearchResultWindow
::
setTextToReplace
(
const
QString
&
textToReplace
)
{
d
->
m_replaceTextEdit
->
setText
(
textToReplace
);
...
...
src/plugins/find/searchresultwindow.h
View file @
214e0bf3
...
...
@@ -82,6 +82,7 @@ public:
SearchResultWindow
();
virtual
~
SearchResultWindow
();
static
SearchResultWindow
*
instance
();
QWidget
*
outputWidget
(
QWidget
*
);
QList
<
QWidget
*>
toolBarWidgets
()
const
;
...
...
@@ -129,6 +130,7 @@ private:
QList
<
SearchResultItem
>
checkedItems
()
const
;
Internal
::
SearchResultWindowPrivate
*
d
;
static
SearchResultWindow
*
m_instance
;
};
}
// namespace Find
...
...
src/plugins/projectexplorer/projectexplorer.cpp
View file @
214e0bf3
...
...
@@ -318,11 +318,11 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
ExtensionSystem
::
PluginManager
*
pm
=
ExtensionSystem
::
PluginManager
::
instance
();
AllProjectsFind
*
allProjectsFind
=
new
AllProjectsFind
(
this
,
pm
->
getObject
<
Find
::
SearchResultWindow
>
());
Find
::
SearchResultWindow
::
instance
());
addAutoReleasedObject
(
allProjectsFind
);
CurrentProjectFind
*
currentProjectFind
=
new
CurrentProjectFind
(
this
,
pm
->
getObject
<
Find
::
SearchResultWindow
>
());
Find
::
SearchResultWindow
::
instance
());
addAutoReleasedObject
(
currentProjectFind
);
addAutoReleasedObject
(
new
LocalApplicationRunControlFactory
);
...
...
src/plugins/texteditor/texteditorplugin.cpp
View file @
214e0bf3
...
...
@@ -157,7 +157,7 @@ void TextEditorPlugin::extensionsInitialized()
ExtensionSystem
::
PluginManager
*
pluginManager
=
ExtensionSystem
::
PluginManager
::
instance
();
m_searchResultWindow
=
pluginManager
->
getObject
<
Find
::
SearchResultWindow
>
();
m_searchResultWindow
=
Find
::
SearchResultWindow
::
instance
();
m_outlineFactory
->
setWidgetFactories
(
pluginManager
->
getObjects
<
TextEditor
::
IOutlineWidgetFactory
>
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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