summaryrefslogtreecommitdiffstats
path: root/doc/scripting-api
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2020-05-05 13:31:32 +0300
committerKatja Marttila <katja.marttila@qt.io>2020-05-26 15:08:51 +0300
commit17a4630886d4a91362f508f27022ae48e076d9c3 (patch)
tree6975e737ae17555de11605e515cfe79337aea760 /doc/scripting-api
parent0fcfdebf88372d527008ff0a080bf0f9eb493c9a (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 'doc/scripting-api')
-rw-r--r--doc/scripting-api/packagemanagercore.qdoc19
-rw-r--r--doc/scripting-api/qfiledialog.qdoc7
2 files changed, 24 insertions, 2 deletions
diff --git a/doc/scripting-api/packagemanagercore.qdoc b/doc/scripting-api/packagemanagercore.qdoc
index 1cff11c84..cb11cef0d 100644
--- a/doc/scripting-api/packagemanagercore.qdoc
+++ b/doc/scripting-api/packagemanagercore.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -332,6 +332,23 @@
*/
/*!
+ \qmlmethod void installer::setFileDialogAutomaticAnswer(string identifier, string &value)
+
+ Automatically sets the existing directory or filename \a value to QFileDialog with the ID
+ \a identifier.
+
+ \sa removeFileDialogAutomaticAnswer
+*/
+
+/*!
+ \qmlmethod void installer::removeFileDialogAutomaticAnswer(string identifier)
+
+ Removes the automatic answer from QFileDialog with the ID \a identifier.
+
+ \sa setFileDialogAutomaticAnswer
+*/
+
+/*!
\qmlmethod float installer::requiredDiskSpace()
Returns the additional estimated amount of disk space in bytes required after installation.
diff --git a/doc/scripting-api/qfiledialog.qdoc b/doc/scripting-api/qfiledialog.qdoc
index 661a702f7..e6cdfdb24 100644
--- a/doc/scripting-api/qfiledialog.qdoc
+++ b/doc/scripting-api/qfiledialog.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -34,6 +34,11 @@
that displays an existing directory selected by the user. Use the
QFileDialog::getOpenFileName() method to create a dialog that displays
matching files in the directory selected by the user.
+ When a command line interface is used, a dialog is not displayed. Instead,
+ the user can type the directory or the file name in the console. For
+ automatic installations, \c{--file-query} with \c{identifier=value} pairs
+ can be given separated with a comma. For example,
+ \c{--file-query filedialog.id=C:/Temp,filedialog.id2=C:/Temp2}.
*/
/*!