Commit 48c2dccd authored by hjk's avatar hjk

debugger: more uiswitcher cleanup

further disentangling of debugger dockwidget updates
remove unneeded variable
make updateDockWidgetSettings private
make dockwidget eventfilter slightly less heavy
parent d6d830f5
......@@ -113,6 +113,8 @@ public:
virtual QString gdbBinaryForToolChain(int toolChain) const = 0;
virtual void showModuleSymbols(const QString &moduleName,
const QVector<Symbol> &symbols) = 0;
virtual void openMemoryEditor() = 0;
virtual void languagesChanged() = 0;
virtual Utils::SavedAction *action(int code) const = 0;
virtual bool boolSetting(int code) const = 0;
......
This diff is collapsed.
......@@ -55,8 +55,6 @@ class DebuggerMainWindowPrivate;
class DEBUGGER_EXPORT DebuggerMainWindow : public Utils::FancyMainWindow
{
Q_OBJECT
public:
DebuggerMainWindow();
~DebuggerMainWindow();
......@@ -80,15 +78,6 @@ public:
QWidget *createContents(Core::IMode *mode);
QMenu *createPopupMenu();
signals:
// Emit when user changes active languages from the menu.
// Both UI and debugger startup are affected.
void activeLanguagesChanged(Debugger::DebuggerLanguages activeLanguages);
void memoryEditorRequested();
public slots:
void updateActiveLanguages();
void updateDockWidgetSettings();
void readSettings();
void writeSettings() const;
......
......@@ -1024,7 +1024,7 @@ public slots:
void attachRemoteTcf();
void enableReverseDebuggingTriggered(const QVariant &value);
void languagesChanged(const Debugger::DebuggerLanguages &languages);
void languagesChanged();
void showStatusMessage(const QString &msg, int timeout = -1);
void openMemoryEditor();
......@@ -1495,11 +1495,11 @@ void DebuggerPluginPrivate::onCurrentProjectChanged(Project *project)
core->updateAdditionalContexts(m_anyContext, Context());
}
void DebuggerPluginPrivate::languagesChanged(const DebuggerLanguages &languages)
void DebuggerPluginPrivate::languagesChanged()
{
const bool debuggerIsCPP = (languages & CppLanguage);
const bool debuggerIsCPP =
m_mainWindow->activeDebugLanguages() & CppLanguage;
//qDebug() << "DEBUGGER IS CPP: " << debuggerIsCPP;
m_startExternalAction->setVisible(debuggerIsCPP);
m_attachExternalAction->setVisible(debuggerIsCPP);
m_attachCoreAction->setVisible(debuggerIsCPP);
......@@ -2568,17 +2568,12 @@ void DebuggerPluginPrivate::createNewDock(QWidget *widget)
m_mainWindow->createDockWidget(CppLanguage, widget);
dockWidget->setWindowTitle(widget->windowTitle());
dockWidget->setFeatures(QDockWidget::DockWidgetClosable);
//dockWidget->setWidget(widget);
//mainWindow()->addDockWidget(Qt::TopDockWidgetArea, dockWidget);
dockWidget->show();
}
void DebuggerPluginPrivate::runControlStarted(DebuggerRunControl *runControl)
{
activateDebugMode();
if (!hasSnapshots())
m_mainWindow->updateActiveLanguages();
const QString message = runControl->idString();
showMessage(message, StatusBar);
showMessage(m_debuggerSettings->dump(), LogDebug);
......@@ -2855,8 +2850,6 @@ void DebuggerPluginPrivate::extensionsInitialized()
dock = m_mainWindow->createDockWidget(CppLanguage, localsAndWatchers);
dock->setProperty(DOCKWIDGET_DEFAULT_AREA, Qt::RightDockWidgetArea);
//m_mainWindow->readSettings();
m_debuggerSettings->readSettings();
GdbOptionsPage::readGdbBinarySettings();
......@@ -3188,11 +3181,6 @@ void DebuggerPluginPrivate::extensionsInitialized()
SIGNAL(valueChanged(QVariant)),
SLOT(enableReverseDebuggingTriggered(QVariant)));
// UI Switcher
connect(m_mainWindow,
SIGNAL(activeLanguagesChanged(Debugger::DebuggerLanguages)),
SLOT(languagesChanged(Debugger::DebuggerLanguages)));
setInitialState();
connectEngine(0);
......@@ -3207,8 +3195,6 @@ void DebuggerPluginPrivate::extensionsInitialized()
QTC_ASSERT(m_coreSettings, /**/);
m_watchersWindow->setVisible(false);
m_returnWindow->setVisible(false);
connect(m_mainWindow, SIGNAL(memoryEditorRequested()),
SLOT(openMemoryEditor()));
// time gdb -i mi -ex 'debuggerplugin.cpp:800' -ex r -ex q bin/qtcreator.bin
const QByteArray env = qgetenv("QTC_DEBUGGER_TEST");
......
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