forked from qt-creator/qt-creator
DebuggerAspect: Show both Cpp and QML debug check boxes
Change-Id: Ice552b9ed78ee7fdc9950b78d042f0f6a59d2657 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user