aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/find/searchresultwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/find/searchresultwindow.cpp')
-rw-r--r--src/plugins/find/searchresultwindow.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/find/searchresultwindow.cpp b/src/plugins/find/searchresultwindow.cpp
index 57cd669515b..a979e9b39c9 100644
--- a/src/plugins/find/searchresultwindow.cpp
+++ b/src/plugins/find/searchresultwindow.cpp
@@ -34,6 +34,8 @@
#include "searchresultwindow.h"
#include "searchresulttreemodel.h"
+#include <coreplugin/icore.h>
+
#include <QtCore/QFile>
#include <QtCore/QTextStream>
#include <QtCore/QSettings>
@@ -46,10 +48,9 @@ using namespace Find::Internal;
static const QString SETTINGSKEYSECTIONNAME("SearchResults");
static const QString SETTINGSKEYEXPANDRESULTS("ExpandResults");
-SearchResultWindow::SearchResultWindow(Core::ICore *core) :
- m_core(core),
- m_widget(new QStackedWidget())
+SearchResultWindow::SearchResultWindow()
{
+ m_widget = new QStackedWidget;
m_widget->setWindowTitle(name());
m_searchResultTreeView = new SearchResultTreeView(m_widget);
@@ -173,8 +174,8 @@ void SearchResultWindow::handleExpandCollapseToolButton(bool checked)
void SearchResultWindow::readSettings(void)
{
- if (m_core && m_core->settings()) {
- QSettings *s = m_core->settings();
+ QSettings *s = Core::ICore::instance()->settings();
+ if (s) {
s->beginGroup(SETTINGSKEYSECTIONNAME);
m_expandCollapseToolButton->setChecked(s->value(SETTINGSKEYEXPANDRESULTS, m_initiallyExpand).toBool());
s->endGroup();
@@ -183,8 +184,8 @@ void SearchResultWindow::readSettings(void)
void SearchResultWindow::writeSettings(void)
{
- if (m_core && m_core->settings()) {
- QSettings *s = m_core->settings();
+ QSettings *s = Core::ICore::instance()->settings();
+ if (s) {
s->beginGroup(SETTINGSKEYSECTIONNAME);
s->setValue(SETTINGSKEYEXPANDRESULTS, m_expandCollapseToolButton->isChecked());
s->endGroup();