Add a default: label to the ToolChainType switches so that gcc doesn't

complain.

Added a Q_ASSERT to the case that shouldn't happen.
This commit is contained in:
dt
2009-08-13 17:36:23 +02:00
parent 32e839c2a2
commit e92ad815d8
2 changed files with 3 additions and 0 deletions

View File

@@ -754,6 +754,7 @@ static IDebuggerEngine *debuggerEngineForToolChain(ProjectExplorer::ToolChain::T
case ProjectExplorer::ToolChain::OTHER: case ProjectExplorer::ToolChain::OTHER:
case ProjectExplorer::ToolChain::UNKNOWN: case ProjectExplorer::ToolChain::UNKNOWN:
case ProjectExplorer::ToolChain::INVALID: case ProjectExplorer::ToolChain::INVALID:
default:
break; break;
} }
if (Debugger::Constants::Internal::debug) if (Debugger::Constants::Internal::debug)

View File

@@ -135,6 +135,8 @@ QString ToolChain::toolChainName(ToolChainType tc)
return QCoreApplication::translate("ToolChain", "<Invalid>"); return QCoreApplication::translate("ToolChain", "<Invalid>");
case UNKNOWN: case UNKNOWN:
break; break;
default:
Q_ASSERT("Missing name for Toolchaintype");
}; };
return QCoreApplication::translate("ToolChain", "<Unknown>"); return QCoreApplication::translate("ToolChain", "<Unknown>");
} }