Make McuToolChainPackage::Type an enum class

And make more use of switch statements without a default case, so each
type is handled explicitly. (Ok, there is a default, but that is
Q_UNREACHABLE).

Change-Id: I30ccc447e55a5aeebebe1a9879ea3136545f5e68
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <piotr.mucko@qt.io>
This commit is contained in:
Erik Verbruggen
2022-02-01 16:29:11 +01:00
committed by piotr.mucko
parent 32f8ed7b66
commit 34345f8b7e
4 changed files with 111 additions and 76 deletions

View File

@@ -122,15 +122,15 @@ private:
class McuToolChainPackage : public McuPackage
{
public:
enum Type {
TypeArmGcc,
TypeIAR,
TypeKEIL,
TypeGHS,
TypeMSVC,
TypeGCC,
TypeGHSArm,
TypeUnsupported
enum class Type {
IAR,
KEIL,
MSVC,
GCC,
ArmGcc,
GHS,
GHSArm,
Unsupported
};
McuToolChainPackage(const QString &label,