diff options
| author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2024-08-27 12:31:57 +0200 |
|---|---|---|
| committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2024-08-28 06:08:01 +0200 |
| commit | ce11e7fae8b4e2cac24f4b1182bae926faf56778 (patch) | |
| tree | dacee8275a940006831ef8bc58de966bd1c0db8b /tools/svgtoqml/main.cpp | |
| parent | 4d1fe0d69c2a6557b16756e59ad0ef7fe67e0d1b (diff) | |
svgtoqml tool: Improve options order, remove tech preview note
- Remove tech preview note in help
- Add single-letter shorthands for some more common options
- Rearrange order options for increased clarity in help
Pick-to: 6.8
Change-Id: Ibada4e59357f0c15772375336a8445fb664f7ee3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'tools/svgtoqml/main.cpp')
| -rw-r--r-- | tools/svgtoqml/main.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tools/svgtoqml/main.cpp b/tools/svgtoqml/main.cpp index 51c2f741ca..912697e047 100644 --- a/tools/svgtoqml/main.cpp +++ b/tools/svgtoqml/main.cpp @@ -22,20 +22,20 @@ int main(int argc, char *argv[]) #endif QCommandLineParser parser; - parser.setApplicationDescription("SVG to QML converter [tech preview]"); + parser.setApplicationDescription("SVG to QML converter"); parser.addHelpOption(); parser.addPositionalArgument("input", QCoreApplication::translate("main", "SVG file to read.")); parser.addPositionalArgument("output", QCoreApplication::translate("main", "QML file to write."), "[output]"); - QCommandLineOption optimizeOption("optimize-paths", - QCoreApplication::translate("main", "Optimize paths for the curve renderer.")); - parser.addOption(optimizeOption); - - QCommandLineOption curveRendererOption("curve-renderer", + QCommandLineOption curveRendererOption({ "c", "curve-renderer" }, QCoreApplication::translate("main", "Use the curve renderer in generated QML.")); parser.addOption(curveRendererOption); - QCommandLineOption typeNameOption(QStringList() << "t" << "type-name", + QCommandLineOption optimizeOption({ "p", "optimize-paths" }, + QCoreApplication::translate("main", "Optimize paths for the curve renderer.")); + parser.addOption(optimizeOption); + + QCommandLineOption typeNameOption({ "t", "type-name" }, QCoreApplication::translate("main", "Use <typename> for Shape."), QCoreApplication::translate("main", "typename")); parser.addOption(typeNameOption); @@ -50,14 +50,6 @@ int main(int argc, char *argv[]) "the original path. Also sets optimize-paths.")); parser.addOption(outlineModeOption); - QCommandLineOption keepPathsOption("keep-external-paths", - QCoreApplication::translate("main", "Any paths to external files will be retained in the QML output. " - "The paths will be reformatted as relative to the output file. If " - "this is not enabled, copies of the file will be saved to the asset output " - "directory. Embedded data will still be saved to files, even if " - "this option is set.")); - parser.addOption(keepPathsOption); - QCommandLineOption assetOutputDirectoryOption("asset-output-directory", QCoreApplication::translate("main", "If the SVG refers to external or embedded files, such as images, these " "will be copied into the same directory as the output QML file by default. " @@ -72,8 +64,16 @@ int main(int argc, char *argv[]) QCoreApplication::translate("main", "prefix")); parser.addOption(assetOutputPrefixOption); + QCommandLineOption keepPathsOption("keep-external-paths", + QCoreApplication::translate("main", "Any paths to external files will be retained in the QML output. " + "The paths will be reformatted as relative to the output file. If " + "this is not enabled, copies of the file will be saved to the asset output " + "directory. Embedded data will still be saved to files, even if " + "this option is set.")); + parser.addOption(keepPathsOption); + #ifdef ENABLE_GUI - QCommandLineOption guiOption(QStringList() << "v" << "view", + QCommandLineOption guiOption({ "v", "view" }, QCoreApplication::translate("main", "Display the generated QML in a window. This is the default behavior if no " "output file is specified.")); parser.addOption(guiOption); |
