diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-10-11 10:08:59 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-10-11 15:01:13 +0200 |
commit | 5533f63312769aceaeac24e771955a569ad70c9c (patch) | |
tree | ee6f8d01de3ebf632cf295633040bc5f4217e605 /tools | |
parent | a1996d02a7035a2585c0e651fd5e9982ee02a2b4 (diff) |
qmlplugindump: Warn if we can't change the directory
It's unclear why we even have to change to the import path, but given
the brittle nature of qmlplugindump, let's keep it that way and simply
output a message if it fails. The static analyzer complains about a
missing return value check.
Coverity-Id: 401048
Change-Id: I72e6258dceb7df76a87584b6fe4f5236d754f7cc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmlplugindump/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 0b61a8bb75..dac28320f6 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -1157,7 +1157,10 @@ int main(int argc, char *argv[]) QDir cur = QDir::current(); cur.cd(pluginImportPath); pluginImportPath = cur.canonicalPath(); - QDir::setCurrent(pluginImportPath); + if (!QDir::setCurrent(pluginImportPath)) { + std::cerr << "Cannot set current directory to import path " + << qPrintable(pluginImportPath) << std::endl; + } engine.addImportPath(pluginImportPath); } |