Skip to content

Commit 63271d9

Browse files
committed
Throw exception if Qt version is unsupported
1 parent a0eaec1 commit 63271d9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/qt-modules.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <string>
33
#include <tuple>
44
#include <vector>
5+
#include <stdexcept>
56

67
#pragma once
78

@@ -167,14 +168,12 @@ static const std::vector<QtModule> Qt6Modules = {
167168

168169
};
169170

170-
static const std::vector<QtModule> EmptyQtModules = {};
171-
172171
inline const std::vector<QtModule>& getQtModules(const int version) {
173172
if (version == 5) {
174173
return Qt5Modules;
175174
}
176175
else if (version == 6) {
177176
return Qt6Modules;
178177
}
179-
return EmptyQtModules;
180-
}
178+
throw std::runtime_error("Unknown Qt version: " + std::to_string(version));
179+
}

0 commit comments

Comments
 (0)