Skip to content

Commit 9a388d3

Browse files
committedMay 25, 2023
Make sure qmlimportscanner is available
1 parent 5129506 commit 9a388d3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/qml.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ fs::path findQmlImportScanner() {
2727

2828
std::string runQmlImportScanner(const std::vector<std::filesystem::path> &sourcesPaths, const std::vector<fs::path> &qmlImportPaths) {
2929
auto qmlImportScannerPath = findQmlImportScanner();
30+
31+
if (findQmlImportScanner().empty()) {
32+
// TODO: come up with some more user friendly logging like it's done for qmake
33+
throw std::runtime_error("error: qmlimportscanner not found $PATH");
34+
}
35+
3036
std::vector<std::string> command{qmlImportScannerPath.string()};
3137

3238
for (const auto &sourcesPath : sourcesPaths)

0 commit comments

Comments
 (0)
Please sign in to comment.