diff options
author | Eskil Abrahamsen Blomfeldt <[email protected]> | 2025-09-11 12:16:52 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <[email protected]> | 2025-09-11 20:00:47 +0200 |
commit | 36e6b151cd91c1029e1f42ae3f25588b3d31aa49 (patch) | |
tree | 1a545d06c4ba97755deaf9252c8d3727ba96e5a7 | |
parent | 641883c7e19b618ee47f0f7988bb161dc1056ae2 (diff) |
svgtoqml: Don't output full file path in comment
As part of the comment generated by svgtoqml, we would include the
entire file path as it was provided in the arguments. With the
introduction of the automatic svgtoqml build step, this argument
will now include the full absolute path.
Since the QML file is embedded in the binary, this caused internal
file paths from our build farm to leak into the binaries, triggering
an alert in the QA system.
Change-Id: Iecffb5cfcf1cee127186b2c5d2e21e2ccc47f48a
Reviewed-by: Samuli Piippo <[email protected]>
-rw-r--r-- | tools/svgtoqml/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/svgtoqml/main.cpp b/tools/svgtoqml/main.cpp index 21efad388e..76e925c8cf 100644 --- a/tools/svgtoqml/main.cpp +++ b/tools/svgtoqml/main.cpp @@ -5,6 +5,7 @@ #include <QQmlApplicationEngine> #include <QCommandLineParser> #include <QFile> +#include <QFileInfo> #include <QQuickWindow> #include <QQuickItem> #include <QtQuickVectorImageGenerator/private/qquickitemgenerator_p.h> @@ -94,7 +95,8 @@ int main(int argc, char *argv[]) const QString inFileName = args.at(0); - QString commentString = QLatin1String("Generated from SVG file %1").arg(inFileName); + QString commentString = QLatin1String("Generated from SVG file %1") + .arg(QFileInfo(inFileName).fileName()); const auto outFileName = args.size() > 1 ? args.at(1) : QString{}; const auto typeName = parser.value(typeNameOption); |