summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore.h
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 /src/libs/installer/packagemanagercore.h
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 'src/libs/installer/packagemanagercore.h')
-rw-r--r--src/libs/installer/packagemanagercore.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/installer/packagemanagercore.h b/src/libs/installer/packagemanagercore.h
index 67e7d6365..e188ed34d 100644
--- a/src/libs/installer/packagemanagercore.h
+++ b/src/libs/installer/packagemanagercore.h
@@ -187,6 +187,10 @@ public:
Q_INVOKABLE void acceptMessageBoxDefaultButton();
Q_INVOKABLE void setAutoAcceptLicenses();
+ Q_INVOKABLE void setFileDialogAutomaticAnswer(const QString &identifier, const QString &value);
+ Q_INVOKABLE void removeFileDialogAutomaticAnswer(const QString &identifier);
+ Q_INVOKABLE bool containsFileDialogAutomaticAnswer(const QString &identifier) const;
+ QHash<QString, QString> fileDialogAutomaticAnswers() const;
quint64 size(QInstaller::Component *component, const QString &value) const;
@@ -385,6 +389,7 @@ private:
private:
PackageManagerCorePrivate *const d;
friend class PackageManagerCorePrivate;
+ QHash<QString, QString> m_fileDialogAutomaticAnswers;
private:
// remove once we deprecate isSelected, setSelected etc...