Skip to content
Snippets Groups Projects
Commit f512deb5 authored by Aurindam Jana's avatar Aurindam Jana Committed by hjk
Browse files

DebuggerAspect: Show both Cpp and QML debug check boxes


Change-Id: Ice552b9ed78ee7fdc9950b78d042f0f6a59d2657
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 16fd2cbb
No related branches found
No related tags found
No related merge requests found
......@@ -150,14 +150,8 @@ void DebuggerRunConfigWidget::update()
m_useMultiProcess->setChecked(m_aspect->useMultiProcess());
m_useQmlDebugger->setVisible(!m_aspect->areQmlDebuggingOptionsSuppressed());
m_qmlDebuggerInfoLabel->setVisible(!m_aspect->areQmlDebuggingOptionsSuppressed());
m_debugServerPortLabel->setVisible(!m_aspect->areQmlDebuggingOptionsSuppressed()
&& !m_aspect->isQmlDebuggingSpinboxSuppressed());
m_debugServerPort->setVisible(!m_aspect->areQmlDebuggingOptionsSuppressed()
&& !m_aspect->isQmlDebuggingSpinboxSuppressed());
m_useCppDebugger->setVisible(!m_aspect->areCppDebuggingOptionsSuppressed());
m_debugServerPortLabel->setVisible(!m_aspect->isQmlDebuggingSpinboxSuppressed());
m_debugServerPort->setVisible(!m_aspect->isQmlDebuggingSpinboxSuppressed());
}
void DebuggerRunConfigWidget::qmlDebugServerPortChanged(int port)
......@@ -237,13 +231,11 @@ void DebuggerRunConfigurationAspect::setUseCppDebugger(bool value)
bool DebuggerRunConfigurationAspect::useCppDebugger() const
{
return m_useCppDebugger && !areCppDebuggingOptionsSuppressed();
return m_useCppDebugger;
}
bool DebuggerRunConfigurationAspect::useQmlDebugger() const
{
if (areQmlDebuggingOptionsSuppressed())
return false;
if (m_useQmlDebugger == DebuggerRunConfigurationAspect::AutoEnableQmlDebugger)
return m_runConfiguration->target()->project()->projectLanguages().contains(
ProjectExplorer::Constants::LANG_QMLJS);
......@@ -270,18 +262,6 @@ void DebuggerRunConfigurationAspect::setUseMultiProcess(bool value)
m_useMultiProcess = value;
}
bool DebuggerRunConfigurationAspect::areQmlDebuggingOptionsSuppressed() const
{
return !m_runConfiguration->target()->project()
->projectLanguages().contains(ProjectExplorer::Constants::LANG_QMLJS);
}
bool DebuggerRunConfigurationAspect::areCppDebuggingOptionsSuppressed() const
{
return !m_runConfiguration->target()->project()
->projectLanguages().contains(ProjectExplorer::Constants::LANG_CXX);
}
bool DebuggerRunConfigurationAspect::isQmlDebuggingSpinboxSuppressed() const
{
ProjectExplorer::Kit *k = m_runConfiguration->target()->kit();
......@@ -327,8 +307,6 @@ DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::clone(
ProjectExplorer::RunConfigWidget *DebuggerRunConfigurationAspect::createConfigurationWidget()
{
if (areCppDebuggingOptionsSuppressed() && areQmlDebuggingOptionsSuppressed())
return 0;
return new Internal::DebuggerRunConfigWidget(this);
}
......@@ -336,8 +314,10 @@ void DebuggerRunConfigurationAspect::ctor()
{
connect(this, SIGNAL(debuggersChanged()),
m_runConfiguration, SIGNAL(requestRunActionsUpdate()));
setUseCppDebugger(!areCppDebuggingOptionsSuppressed());
setUseQmlDebugger(!areQmlDebuggingOptionsSuppressed());
setUseCppDebugger(m_runConfiguration->target()->project()->projectLanguages().contains(
ProjectExplorer::Constants::LANG_CXX));
setUseQmlDebugger(m_runConfiguration->target()->project()->projectLanguages().contains(
ProjectExplorer::Constants::LANG_QMLJS));
}
} // namespace Debugger
......
......@@ -70,8 +70,6 @@ public:
void setQmllDebugServerPort(uint port);
bool useMultiProcess() const;
void setUseMultiProcess(bool on);
bool areQmlDebuggingOptionsSuppressed() const;
bool areCppDebuggingOptionsSuppressed() const;
bool isQmlDebuggingSpinboxSuppressed() const;
ProjectExplorer::RunConfiguration *runConfiguration();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment