Commit 7079a835 authored by El Mehdi Fekari's avatar El Mehdi Fekari Committed by hjk
Browse files

Debugger: Add new debuggers from option page



The asserts should be moved from the addDebugger() method
which is called to add an 'empty' debugger when adding new one
from the option page.

Change-Id: Ic402db514d1e97f5fdc12d9bb9070bf29b2ab354
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent c033fc3a
...@@ -647,6 +647,9 @@ void DebuggerItemManager::saveDebuggers() ...@@ -647,6 +647,9 @@ void DebuggerItemManager::saveDebuggers()
QVariant DebuggerItemManager::registerDebugger(const DebuggerItem &item) QVariant DebuggerItemManager::registerDebugger(const DebuggerItem &item)
{ {
QTC_ASSERT(!item.command().isEmpty(), return QVariant());
QTC_ASSERT(!item.displayName().isEmpty(), return QVariant());
QTC_ASSERT(item.engineType() != NoEngineType, return QVariant());
if (findByCommand(item.command())) if (findByCommand(item.command()))
return item.id(); return item.id();
...@@ -661,9 +664,6 @@ void DebuggerItemManager::deregisterDebugger(const DebuggerItem &item) ...@@ -661,9 +664,6 @@ void DebuggerItemManager::deregisterDebugger(const DebuggerItem &item)
QVariant DebuggerItemManager::addDebugger(const DebuggerItem &item) QVariant DebuggerItemManager::addDebugger(const DebuggerItem &item)
{ {
QTC_ASSERT(!item.command().isEmpty(), return QVariant());
QTC_ASSERT(!item.displayName().isEmpty(), return QVariant());
QTC_ASSERT(item.engineType() != NoEngineType, return QVariant());
QTC_ASSERT(item.id().isValid(), return QVariant()); QTC_ASSERT(item.id().isValid(), return QVariant());
m_debuggers.append(item); m_debuggers.append(item);
m_model->addDebugger(item); m_model->addDebugger(item);
......
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