Commit b14a2082 authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

Made debugger menu items disabled in QML inspector mode

parent 7d423d5f
......@@ -163,6 +163,7 @@ DebuggerSettings *DebuggerSettings::instance()
item->setText(tr("Operate by Instruction"));
item->setCheckable(true);
item->setDefaultValue(false);
item->setSettingsKey(debugModeGroup, QLatin1String("OperateByInstruction"));
item->setIcon(QIcon(":/debugger/images/SingleInstructionMode.png"));
item->setToolTip(tr("This switches the debugger to instruction-wise "
"operation mode. In this mode, stepping operates on single "
......
......@@ -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
......
......@@ -280,6 +280,7 @@ public slots: // FIXME
void reloadFullStack();
void operateByInstructionTriggered();
void startFailed();
void languageChanged(const QString &debuggerLanguage);
private:
Internal::ModulesHandler *modulesHandler() const;
......
......@@ -126,7 +126,6 @@ int DebuggerUISwitcher::activeLanguageId() const
{
return d->m_activeLanguage;
}
void DebuggerUISwitcher::modeChanged(Core::IMode *mode)
{
d->m_isActiveMode = (mode->id() == Debugger::Constants::MODE_DEBUG);
......
......@@ -650,6 +650,8 @@ QmlJSTextEditor::QmlJSTextEditor(QWidget *parent) :
connect(m_semanticHighlighter, SIGNAL(changed(QmlJSEditor::Internal::SemanticInfo)),
this, SLOT(updateSemanticInfo(QmlJSEditor::Internal::SemanticInfo)));
setRequestMarkEnabled(false);
}
QmlJSTextEditor::~QmlJSTextEditor()
......
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