forked from qt-creator/qt-creator
Variables: Use lambdas as callbacks to resolve variables
Instead of broadcasting for each resolution we ask the code that knows about a specific variable directly. Change-Id: I2f0f4f2acceba85a236995d236980594a3166bd8 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -175,10 +175,10 @@ public:
|
||||
connect(&m_locationTimer, SIGNAL(timeout()), SLOT(resetLocation()));
|
||||
connect(debuggerCore()->action(IntelFlavor), SIGNAL(valueChanged(QVariant)),
|
||||
SLOT(reloadDisassembly()));
|
||||
|
||||
VariableManager::registerFileVariables(PrefixDebugExecutable,
|
||||
tr("Debugged executable"));
|
||||
connect(VariableManager::instance(), SIGNAL(variableUpdateRequested(QByteArray)),
|
||||
SLOT(updateVariable(QByteArray)));
|
||||
tr("Debugged executable"),
|
||||
[&]() { return this->m_startParameters.executable; });
|
||||
}
|
||||
|
||||
public slots:
|
||||
@@ -190,13 +190,6 @@ public slots:
|
||||
void doInterruptInferior();
|
||||
void doFinishDebugger();
|
||||
|
||||
void updateVariable(const QByteArray &variable)
|
||||
{
|
||||
if (VariableManager::isFileVariable(variable, PrefixDebugExecutable))
|
||||
VariableManager::insert(variable,
|
||||
VariableManager::fileVariableValue(variable, PrefixDebugExecutable, m_startParameters.executable));
|
||||
}
|
||||
|
||||
void reloadDisassembly()
|
||||
{
|
||||
m_disassemblerAgent.reload();
|
||||
|
||||
Reference in New Issue
Block a user