Commit 8450ca3f authored by hjk's avatar hjk

debugger: remove unused member

parent c1edc308
......@@ -48,12 +48,12 @@
#include <coreplugin/outputpane.h>
#include <coreplugin/rightpane.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/session.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/runconfiguration.h>
#include <QtCore/QDebug>
#include <QtCore/QList>
......@@ -158,7 +158,6 @@ public:
QWeakPointer<RunConfiguration> m_previousRunConfiguration;
bool m_initialized;
QSettings *m_settings;
};
DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *mw)
......@@ -173,9 +172,7 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *mw)
, m_activeDebugLanguages(AnyLanguage)
, m_viewsMenu(0)
, m_initialized(false)
, m_settings(0)
{
}
{}
void DebuggerMainWindowPrivate::updateUiOnFileListChange()
{
......@@ -270,11 +267,6 @@ void DebuggerMainWindow::updateActiveLanguages()
d->updateUi();
}
DebuggerLanguages DebuggerMainWindow::supportedLanguages() const
{
return d->m_supportedLanguages;
}
DebuggerLanguages DebuggerMainWindow::activeDebugLanguages() const
{
return d->m_activeDebugLanguages;
......@@ -585,37 +577,47 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
void DebuggerMainWindow::writeSettings() const
{
d->m_settings->beginGroup(QLatin1String("DebugMode.CppMode"));
ICore *core = ICore::instance();
QTC_ASSERT(core, return);
QSettings *settings = core->settings();
QTC_ASSERT(settings, return);
settings->beginGroup(QLatin1String("DebugMode.CppMode"));
QHashIterator<QString, QVariant> it(d->m_dockWidgetActiveStateCpp);
while (it.hasNext()) {
it.next();
d->m_settings->setValue(it.key(), it.value());
settings->setValue(it.key(), it.value());
}
d->m_settings->endGroup();
settings->endGroup();
d->m_settings->beginGroup(QLatin1String("DebugMode.CppQmlMode"));
settings->beginGroup(QLatin1String("DebugMode.CppQmlMode"));
it = QHashIterator<QString, QVariant>(d->m_dockWidgetActiveStateQmlCpp);
while (it.hasNext()) {
it.next();
d->m_settings->setValue(it.key(), it.value());
settings->setValue(it.key(), it.value());
}
d->m_settings->endGroup();
settings->endGroup();
}
void DebuggerMainWindow::readSettings()
{
ICore *core = ICore::instance();
QTC_ASSERT(core, return);
QSettings *settings = core->settings();
QTC_ASSERT(settings, return);
d->m_dockWidgetActiveStateCpp.clear();
d->m_dockWidgetActiveStateQmlCpp.clear();
d->m_settings->beginGroup(QLatin1String("DebugMode.CppMode"));
foreach (const QString &key, d->m_settings->childKeys())
d->m_dockWidgetActiveStateCpp.insert(key, d->m_settings->value(key));
d->m_settings->endGroup();
settings->beginGroup(QLatin1String("DebugMode.CppMode"));
foreach (const QString &key, settings->childKeys())
d->m_dockWidgetActiveStateCpp.insert(key, settings->value(key));
settings->endGroup();
d->m_settings->beginGroup(QLatin1String("DebugMode.CppQmlMode"));
foreach (const QString &key, d->m_settings->childKeys())
d->m_dockWidgetActiveStateQmlCpp.insert(key, d->m_settings->value(key));
d->m_settings->endGroup();
settings->beginGroup(QLatin1String("DebugMode.CppQmlMode"));
foreach (const QString &key, settings->childKeys())
d->m_dockWidgetActiveStateQmlCpp.insert(key, settings->value(key));
settings->endGroup();
// reset initial settings when there are none yet
DebuggerLanguages langs = d->m_activeDebugLanguages;
......@@ -630,9 +632,8 @@ void DebuggerMainWindow::readSettings()
d->m_activeDebugLanguages = langs;
}
void DebuggerMainWindow::initialize(QSettings *settings)
void DebuggerMainWindow::initialize()
{
d->m_settings = settings;
d->createViewsMenuItems();
emit dockResetRequested(AnyLanguage);
......
......@@ -39,7 +39,6 @@
QT_BEGIN_NAMESPACE
class QDockWidget;
class QSettings;
class QMenu;
QT_END_NAMESPACE
......@@ -65,17 +64,14 @@ public:
// Debuggable languages are registered with this function.
void addLanguage(const DebuggerLanguage &language, const Core::Context &context);
// Debugger toolbars are registered with this function
// Debugger toolbars are registered with this function.
void setToolbar(const DebuggerLanguage &language, QWidget *widget);
// All supported languages
DebuggerLanguages supportedLanguages() const;
// Active languages to be debugged.
DebuggerLanguages activeDebugLanguages() const;
// Called when all dependent plugins have loaded
void initialize(QSettings *settings);
// Called when all dependent plugins have loaded.
void initialize();
void onModeChanged(Core::IMode *mode);
......
......@@ -737,7 +737,7 @@ QWidget *DebuggingHelperOptionPage::createPage(QWidget *parent)
#ifndef QT_DEBUG
#if 0
cmd = am->registerAction(m_manager->m_dumpLogAction,
cmd = am->registerAction(m_dumpLogAction,
DUMP_LOG, globalcontext);
//cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+D,Ctrl+L")));
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+F11")));
......@@ -1324,7 +1324,6 @@ public slots:
public:
DebuggerState m_state;
DebuggerMainWindow *m_mainWindow;
DebuggerPlugin *m_manager;
DebugMode *m_debugMode;
DebuggerRunControlFactory *m_debuggerRunControlFactory;
......@@ -2949,7 +2948,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
ExtensionSystem::PluginManager::instance()->addObject(m_mainWindow);
m_mainWindow->addLanguage(CppLanguage, cppDebuggercontext);
m_mainWindow->addLanguage(QmlLanguage, qmlDebuggerContext);
m_mainWindow->initialize(m_coreSettings);
m_mainWindow->initialize();
readSettings();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment