Made debugger menu items disabled in QML inspector mode

This commit is contained in:
Lasse Holmstedt
2010-03-17 18:41:14 +01:00
parent 7d423d5f96
commit b14a208273
5 changed files with 16 additions and 1 deletions

View File

@@ -466,6 +466,10 @@ void DebuggerManager::init()
connect(this, SIGNAL(emitShowOutput(int, QString)),
d->m_outputWindow, SLOT(showOutput(int, QString)), Qt::QueuedConnection);
// UI Switcher
connect(DebuggerUISwitcher::instance(), SIGNAL(languageChanged(QString)),
this, SLOT(languageChanged(QString)));
// Tooltip
//QTreeView *tooltipView = qobject_cast<QTreeView *>(d->m_tooltipWindow);
//tooltipView->setModel(d->m_watchHandler->model(TooltipsWatch));
@@ -1925,6 +1929,14 @@ void DebuggerManager::fontSettingsChanged(const TextEditor::FontSettings &settin
changeFontSize(d->m_threadsWindow, size);
}
// only update necessary menu items on language change
void DebuggerManager::languageChanged(const QString &debuggerLanguage)
{
const bool debuggerIsCPP = (debuggerLanguage == Constants::LANG_CPP);
d->m_actions.reverseDirectionAction->setEnabled(debuggerIsCPP);
theDebuggerAction(OperateByInstruction)->setEnabled(debuggerIsCPP);
}
//////////////////////////////////////////////////////////////////////
//
// AbstractDebuggerEngine