Commit 0f4a7f30 authored by Tobias Hunger's avatar Tobias Hunger Committed by hjk

Debugger: Do not lose the engine type in the debuggeritemmodel

Have the DebuggerItemConfigWidget remember the engine type (even
though it does not display it), so that it can write that information
back into the model later.

Change-Id: I1ed0d6a8d3750696a7eb5c453179acc282b78ce4
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 3d9a71a2
......@@ -106,6 +106,7 @@ DebuggerItem DebuggerItemConfigWidget::item() const
abiList << a;
}
item.setAbis(abiList);
item.setEngineType(m_engineType);
return item;
}
......@@ -159,6 +160,7 @@ void DebuggerItemConfigWidget::setItem(const DebuggerItem &item)
m_binaryChooser->setCommandVersionArguments(QStringList(versionCommand));
setAbis(item.abiNames());
m_engineType = item.engineType();
}
void DebuggerItemConfigWidget::apply()
......@@ -178,14 +180,17 @@ void DebuggerItemConfigWidget::commandWasChanged()
= DebuggerItemManager::findByCommand(m_binaryChooser->fileName());
if (existing) {
setAbis(existing->abiNames());
m_engineType = existing->engineType();
} else {
QFileInfo fi = QFileInfo(m_binaryChooser->path());
if (fi.isExecutable()) {
DebuggerItem tmp = item();
tmp.reinitializeFromFile();
setAbis(tmp.abiNames());
m_engineType = tmp.engineType();
}
}
m_model->updateDebugger(item());
}
// --------------------------------------------------------------------------
......
......@@ -82,6 +82,7 @@ private:
QLineEdit *m_abis;
DebuggerItemModel *m_model;
bool m_autodetected;
DebuggerEngineType m_engineType;
QVariant m_id;
};
......
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