Commit f512deb5 authored by Aurindam Jana's avatar Aurindam Jana Committed by hjk

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
...@@ -150,14 +150,8 @@ void DebuggerRunConfigWidget::update() ...@@ -150,14 +150,8 @@ void DebuggerRunConfigWidget::update()
m_useMultiProcess->setChecked(m_aspect->useMultiProcess()); m_useMultiProcess->setChecked(m_aspect->useMultiProcess());
m_useQmlDebugger->setVisible(!m_aspect->areQmlDebuggingOptionsSuppressed()); m_debugServerPortLabel->setVisible(!m_aspect->isQmlDebuggingSpinboxSuppressed());
m_qmlDebuggerInfoLabel->setVisible(!m_aspect->areQmlDebuggingOptionsSuppressed()); m_debugServerPort->setVisible(!m_aspect->isQmlDebuggingSpinboxSuppressed());
m_debugServerPortLabel->setVisible(!m_aspect->areQmlDebuggingOptionsSuppressed()
&& !m_aspect->isQmlDebuggingSpinboxSuppressed());
m_debugServerPort->setVisible(!m_aspect->areQmlDebuggingOptionsSuppressed()
&& !m_aspect->isQmlDebuggingSpinboxSuppressed());
m_useCppDebugger->setVisible(!m_aspect->areCppDebuggingOptionsSuppressed());
} }
void DebuggerRunConfigWidget::qmlDebugServerPortChanged(int port) void DebuggerRunConfigWidget::qmlDebugServerPortChanged(int port)
...@@ -237,13 +231,11 @@ void DebuggerRunConfigurationAspect::setUseCppDebugger(bool value) ...@@ -237,13 +231,11 @@ void DebuggerRunConfigurationAspect::setUseCppDebugger(bool value)
bool DebuggerRunConfigurationAspect::useCppDebugger() const bool DebuggerRunConfigurationAspect::useCppDebugger() const
{ {
return m_useCppDebugger && !areCppDebuggingOptionsSuppressed(); return m_useCppDebugger;
} }
bool DebuggerRunConfigurationAspect::useQmlDebugger() const bool DebuggerRunConfigurationAspect::useQmlDebugger() const
{ {
if (areQmlDebuggingOptionsSuppressed())
return false;
if (m_useQmlDebugger == DebuggerRunConfigurationAspect::AutoEnableQmlDebugger) if (m_useQmlDebugger == DebuggerRunConfigurationAspect::AutoEnableQmlDebugger)
return m_runConfiguration->target()->project()->projectLanguages().contains( return m_runConfiguration->target()->project()->projectLanguages().contains(
ProjectExplorer::Constants::LANG_QMLJS); ProjectExplorer::Constants::LANG_QMLJS);
...@@ -270,18 +262,6 @@ void DebuggerRunConfigurationAspect::setUseMultiProcess(bool value) ...@@ -270,18 +262,6 @@ void DebuggerRunConfigurationAspect::setUseMultiProcess(bool value)
m_useMultiProcess = 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 bool DebuggerRunConfigurationAspect::isQmlDebuggingSpinboxSuppressed() const
{ {
ProjectExplorer::Kit *k = m_runConfiguration->target()->kit(); ProjectExplorer::Kit *k = m_runConfiguration->target()->kit();
...@@ -327,8 +307,6 @@ DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::clone( ...@@ -327,8 +307,6 @@ DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::clone(
ProjectExplorer::RunConfigWidget *DebuggerRunConfigurationAspect::createConfigurationWidget() ProjectExplorer::RunConfigWidget *DebuggerRunConfigurationAspect::createConfigurationWidget()
{ {
if (areCppDebuggingOptionsSuppressed() && areQmlDebuggingOptionsSuppressed())
return 0;
return new Internal::DebuggerRunConfigWidget(this); return new Internal::DebuggerRunConfigWidget(this);
} }
...@@ -336,8 +314,10 @@ void DebuggerRunConfigurationAspect::ctor() ...@@ -336,8 +314,10 @@ void DebuggerRunConfigurationAspect::ctor()
{ {
connect(this, SIGNAL(debuggersChanged()), connect(this, SIGNAL(debuggersChanged()),
m_runConfiguration, SIGNAL(requestRunActionsUpdate())); m_runConfiguration, SIGNAL(requestRunActionsUpdate()));
setUseCppDebugger(!areCppDebuggingOptionsSuppressed()); setUseCppDebugger(m_runConfiguration->target()->project()->projectLanguages().contains(
setUseQmlDebugger(!areQmlDebuggingOptionsSuppressed()); ProjectExplorer::Constants::LANG_CXX));
setUseQmlDebugger(m_runConfiguration->target()->project()->projectLanguages().contains(
ProjectExplorer::Constants::LANG_QMLJS));
} }
} // namespace Debugger } // namespace Debugger
......
...@@ -70,8 +70,6 @@ public: ...@@ -70,8 +70,6 @@ public:
void setQmllDebugServerPort(uint port); void setQmllDebugServerPort(uint port);
bool useMultiProcess() const; bool useMultiProcess() const;
void setUseMultiProcess(bool on); void setUseMultiProcess(bool on);
bool areQmlDebuggingOptionsSuppressed() const;
bool areCppDebuggingOptionsSuppressed() const;
bool isQmlDebuggingSpinboxSuppressed() const; bool isQmlDebuggingSpinboxSuppressed() const;
ProjectExplorer::RunConfiguration *runConfiguration(); ProjectExplorer::RunConfiguration *runConfiguration();
......
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