#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>
QWeakPointer<RunConfiguration> m_previousRunConfiguration;
bool m_initialized;
- QSettings *m_settings;
};
DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *mw)
, m_activeDebugLanguages(AnyLanguage)
, m_viewsMenu(0)
, m_initialized(false)
- , m_settings(0)
-{
-}
+{}
void DebuggerMainWindowPrivate::updateUiOnFileListChange()
{
d->updateUi();
}
-DebuggerLanguages DebuggerMainWindow::supportedLanguages() const
-{
- return d->m_supportedLanguages;
-}
-
DebuggerLanguages DebuggerMainWindow::activeDebugLanguages() const
{
return d->m_activeDebugLanguages;
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;
d->m_activeDebugLanguages = langs;
}
-void DebuggerMainWindow::initialize(QSettings *settings)
+void DebuggerMainWindow::initialize()
{
- d->m_settings = settings;
d->createViewsMenuItems();
emit dockResetRequested(AnyLanguage);
#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")));
public:
DebuggerState m_state;
DebuggerMainWindow *m_mainWindow;
- DebuggerPlugin *m_manager;
DebugMode *m_debugMode;
DebuggerRunControlFactory *m_debuggerRunControlFactory;
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();