diff options
author | Katja Marttila <katja.marttila@qt.io> | 2020-05-05 13:31:32 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2020-05-26 15:08:51 +0300 |
commit | 17a4630886d4a91362f508f27022ae48e076d9c3 (patch) | |
tree | 6975e737ae17555de11605e515cfe79337aea760 /src/libs/installer/commandlineparser.cpp | |
parent | 0fcfdebf88372d527008ff0a080bf0f9eb493c9a (diff) |
CLI: Add new option --file-query to auto answer QFileDialog
QFileDialog.getExistingDirectory and QFileDialog.getOpenFileName
can be called from scipt. If command line interface is used, user must
type the correct directory or file name from command line during install.
With --file-query option user can give the values when running the
installer or maintenancetool with syntax --file-query
filedialogId=C:/temp,filedialogId2=C:/temp/file.txt.
Task-number: QTIFW-1631
Change-Id: I5e58be6b509cf00de832646ef31ec4eda90773be
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs/installer/commandlineparser.cpp')
-rw-r--r-- | src/libs/installer/commandlineparser.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libs/installer/commandlineparser.cpp b/src/libs/installer/commandlineparser.cpp index 60b02c3ae..f3939dc36 100644 --- a/src/libs/installer/commandlineparser.cpp +++ b/src/libs/installer/commandlineparser.cpp @@ -163,6 +163,12 @@ CommandLineParser::CommandLineParser() QLatin1String("Automatically answers to message queries with their default values."))); m_parser.addOption(QCommandLineOption(QStringList() << CommandLineOptions::scAcceptLicenses, QLatin1String("Accepts all licenses without user input."))); + m_parser.addOption(QCommandLineOption(QStringList() << CommandLineOptions::scFileDialogAutomaticAnswer, + QLatin1String("Automatically sets the QFileDialog values getExistingDirectory() or getOpenFileName() " + "requested by install script. " + "Several identifier=value pairs can be given separated with comma, " + "for example --file-query filedialog.id=C:\Temp,filedialog.id2=C:\Temp2"), + QLatin1String("identifier=value"))); // Developer options m_parser.addOption(QCommandLineOption(QStringList() |