summaryrefslogtreecommitdiffstats
path: root/doc/scripting-api
diff options
context:
space:
mode:
Diffstat (limited to 'doc/scripting-api')
-rw-r--r--doc/scripting-api/buttons.qdoc4
-rw-r--r--doc/scripting-api/component.qdoc16
-rw-r--r--doc/scripting-api/console.qdoc6
-rw-r--r--doc/scripting-api/gui.qdoc43
-rw-r--r--doc/scripting-api/packagemanagercore.qdoc90
-rw-r--r--doc/scripting-api/print.qdoc4
-rw-r--r--doc/scripting-api/qdesktopservices.qdoc12
-rw-r--r--doc/scripting-api/qfiledialog.qdoc13
-rw-r--r--doc/scripting-api/qinstaller.qdoc4
-rw-r--r--doc/scripting-api/qsettings.qdoc57
10 files changed, 193 insertions, 56 deletions
diff --git a/doc/scripting-api/buttons.qdoc b/doc/scripting-api/buttons.qdoc
index ea43b76f7..36f27b8d9 100644
--- a/doc/scripting-api/buttons.qdoc
+++ b/doc/scripting-api/buttons.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/doc/scripting-api/component.qdoc b/doc/scripting-api/component.qdoc
index 00480cd63..51f36ac11 100644
--- a/doc/scripting-api/component.qdoc
+++ b/doc/scripting-api/component.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
@@ -327,14 +327,16 @@
/*!
\qmlmethod boolean component::addOperation(string operation, string parameter1 = "", string parameter2 = "", ..., string parameter10 = "")
- Convenience method for calling addOperation(string, stringlist) with up to 10 arguments.
+ Convenience method for calling addOperation(string, stringlist) with up to
+ 10 arguments \a parameter1, \a parameter2, ... \a parameter10.
Creates and adds an installation operation for \a operation.
*/
/*!
\qmlmethod boolean component::addElevatedOperation(string operation, string parameter1 = "", string parameter2 = "", ..., string parameter10 = "")
- Convenience method for calling addElevatedOperation(string, stringlist) with up to 10 arguments.
+ Convenience method for calling addElevatedOperation(string, stringlist) with up to
+ 10 arguments \a parameter1, \a parameter2, ... \a parameter10.
Creates and adds an installation operation for \a operation. The operation is executed with elevated rights.
*/
@@ -420,6 +422,12 @@
*/
/*!
+ \qmlmethod boolean component::isUpdateAvailable()
+
+ Determines whether update is available for component.
+*/
+
+/*!
\qmlmethod boolean component::componentChangeRequested()
Returns \c true if this component will be changed (update, installation, or
diff --git a/doc/scripting-api/console.qdoc b/doc/scripting-api/console.qdoc
index 350257820..7785d9223 100644
--- a/doc/scripting-api/console.qdoc
+++ b/doc/scripting-api/console.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
@@ -37,7 +37,7 @@
\l{console::log()}{log} method and \l installer object
\l{installer::isUpdater()}, \l{installer::isUninstaller()}, and
\l{installer::isPackageManager()} methods to display a message that
- indicates whether the maintenance tool is currently being used to update,
+ indicates whether the \MT is currently being used to update,
remove, or add components.
\code
diff --git a/doc/scripting-api/gui.qdoc b/doc/scripting-api/gui.qdoc
index b68d13dee..b9e6c1b5f 100644
--- a/doc/scripting-api/gui.qdoc
+++ b/doc/scripting-api/gui.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2024 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
@@ -58,6 +58,13 @@
*/
/*!
+ \qmlsignal gui::aboutApplicationClicked()
+
+ This signal is emitted when the about application menu and dialog
+ on macOS are shown.
+*/
+
+/*!
\qmlsignal gui::settingsButtonClicked()
This signal is emitted when the \uicontrol Settings button is clicked.
@@ -119,9 +126,35 @@
*/
/*!
+ \qmlmethod void gui::setWizardPageButtonText(int pageId, int buttonId, string buttonText)
+
+ Sets \a buttonText for button specified by \a buttonId to a installer page \a pageId.
+
+ \note In some pages, installer will change the button text when entering
+ the page. In that case, you need to connect to \c entered() -signal of the
+ page to change the \a buttonText.
+
+ \code
+ function Component()
+ {
+ var page = gui.pageByObjectName("FinishedPage");
+ page.entered.connect(Component.prototype.finishPageEntered);
+ }
+ Component.prototype.finishPageEntered = function()
+ {
+ gui.setWizardPageButtonText(QInstaller.InstallationFinished, buttons.CommitButton, "Commit");
+ }
+ \endcode
+*/
+
+/*!
\qmlmethod void gui::showSettingsButton(boolean show)
- Shows the \uicontrol Settings button if \a show is \c true.
+ Shows the \uicontrol Settings button if \a show is \c true. This function
+ overrides the visibility of the \uicontrol Settings button in all pages. Be
+ careful when showing the settings button so that users cannot change network
+ settings while downloading data in the background. Changing the
+ settings will restart the wizard and switch back to the introduction page.
*/
/*!
@@ -173,10 +206,6 @@
*/
/*!
- \qmlmethod void gui::setModified(boolean value)
-*/
-
-/*!
\qmlmethod void gui::setTextItems(object control, stringlist items)
Updates the model of \a control (which must be a QComboBox or QAbstractItemView)
diff --git a/doc/scripting-api/packagemanagercore.qdoc b/doc/scripting-api/packagemanagercore.qdoc
index ea32a59b7..ecf4b1eaa 100644
--- a/doc/scripting-api/packagemanagercore.qdoc
+++ b/doc/scripting-api/packagemanagercore.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2023 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
@@ -71,24 +71,6 @@
\qmlsignal installer::componentAdded(Component component)
Emitted when a new root \a component is added.
-
- \sa rootComponentsAdded(), updaterComponentsAdded()
-*/
-
-/*!
- \qmlsignal installer::rootComponentsAdded(list<Component> components)
-
- Emitted when a new list of root \a components is added.
-
- \sa componentAdded(), updaterComponentsAdded()
-*/
-
-/*!
- \qmlsignal installer::updaterComponentsAdded(list<Component> components)
-
- Emitted when a new list of updater \a components is added.
-
- \sa componentAdded(), rootComponentsAdded()
*/
/*!
@@ -235,6 +217,12 @@
*/
/*!
+ \qmlsignal installer::downloadArchivesFinished()
+
+ Emitted when all data archives for components have been downloaded successfully.
+*/
+
+/*!
\qmlsignal installer::wizardPageInsertionRequested(Widget widget, WizardPage page)
Emitted when a custom \a widget is about to be inserted into \a page by addWizardPage.
@@ -319,15 +307,25 @@
*/
/*!
+ \qmlmethod boolean installer::recalculateAllComponents()
+
+ Recalculates all components to install and uninstall. Returns \c true
+ on success, \c false otherwise.
+*/
+
+/*!
\qmlmethod void installer::componentsToInstallNeedsRecalculation()
+ \deprecated [4.5] Use recalculateAllComponents() instead.
Ensures that component dependencies are re-calculated.
*/
/*!
\qmlmethod void installer::clearComponentsToInstallCalculated()
-
- Forces a recalculation of components to install.
+ \deprecated [4.5] Installer framework recalculates components each time the calculation
+ of components to install is requested, so there is no need to call this anymore, and the
+ method does nothing. On previous versions calling this forced a recalculation of
+ components to install.
*/
/*!
@@ -445,7 +443,12 @@
On Unix platforms the returned string is the same as the argument.
+ \note Predefined variables, such as @TargetDir@, are not resolved by
+ this function. To convert the separators to predefined variables, use
+ \c installer.value() to resolve the variables first.
+
\sa fromNativeSeparators()
+ \sa value()
*/
/*!
@@ -455,7 +458,12 @@
On Unix platforms the returned string is the same as the argument.
+ \note Predefined variables, such as @TargetDir@, are not resolved by
+ this function. To convert the separators to predefined variables, use
+ \c installer.value() to resolve the variables first.
+
\sa toNativeSeparators()
+ \sa value()
*/
/*!
@@ -589,6 +597,18 @@
*/
/*!
+ \qmlmethod bool installer::hasAdminRights()
+
+ Returns \c true if the installer has admin rights. For example, if the installer
+ was started with a root account, or the internal admin rights elevation is active.
+
+ Returns \c false otherwise.
+
+ \sa gainAdminRights()
+ \sa dropAdminRights()
+*/
+
+/*!
\qmlmethod boolean installer::isProcessRunning(string name)
Returns \c true if a process with \a name is running. On Windows, the comparison
@@ -607,15 +627,23 @@
/*!
\qmlmethod void installer::setAllowedRunningProcesses(stringlist processes)
+ \deprecated [4.6] The \MT no longer automatically checks for all running processes
+ in the installation directory for CLI runs. To check for a process to stop, use
+ \l {component::addStopProcessForUpdateRequest}{component.addStopProcessForUpdateRequest} instead.
+
Sets additional \a processes that can run when
- updating with the maintenance tool.
+ updating with the \MT.
*/
/*!
\qmlmethod stringlist installer::allowedRunningProcesses()
+ \deprecated [4.6] The \MT no longer automatically checks for all running processes
+ in the installation directory for CLI runs. To check for a process to stop, use
+ \l {component::addStopProcessForUpdateRequest}{component.addStopProcessForUpdateRequest} instead.
+
Returns processes that are allowed to run when updating with
- the maintenance tool.
+ the \MT.
*/
/*!
@@ -730,7 +758,7 @@
/*!
\qmlmethod void installer::setInstallerBaseBinary(string path)
- Sets the \c installerbase binary to use when writing the maintenance tool.
+ Sets the \c installerbase binary to use when writing the \MT.
Set the \a path if an update to the binary is available.
If not set, the executable segment of the running installer or uninstaller
@@ -738,10 +766,16 @@
*/
/*!
- \qmlmethod string installer::value(string key, string defaultValue = "")
+ \qmlmethod string installer::value(string key, string defaultValue = "", int format = 0)
- Returns the installer value for \a key. If \a key is not known to the system, \a defaultValue is
- returned. Additionally, on Windows, \a key can be a registry key.
+ Returns the installer value for \a key. If \a key is not known to the system,
+ \a defaultValue is returned. Additionally, on Windows, \a key can be a
+ registry key. Optionally, you can specify the \a format of the registry key.
+ By default the \a format is QSettings::NativeFormat. For accessing
+ the 32-bit system registry from a 64-bit application running on 64-bit
+ Windows, use QSettings::Registry32Format. For accessing the 64-bit system
+ registry from a 32-bit application running on 64-bit Windows, use
+ QSettings::Registry64Format.
\sa setValue, containsValue, valueChanged
*/
diff --git a/doc/scripting-api/print.qdoc b/doc/scripting-api/print.qdoc
index 8d609d310..55c7b8fbb 100644
--- a/doc/scripting-api/print.qdoc
+++ b/doc/scripting-api/print.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/doc/scripting-api/qdesktopservices.qdoc b/doc/scripting-api/qdesktopservices.qdoc
index 126e0b843..a9c8a149f 100644
--- a/doc/scripting-api/qdesktopservices.qdoc
+++ b/doc/scripting-api/qdesktopservices.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
@@ -56,14 +56,18 @@
\li DesktopServices.PicturesLocation
\li DesktopServices.TempLocation
\li DesktopServices.HomeLocation
- \li DesktopServices.DataLocation
+ \li DesktopServices.AppLocalDataLocation
\li DesktopServices.CacheLocation
+ \li DesktopServices.GenericCacheLocation
\li DesktopServices.GenericDataLocation
\li DesktopServices.RuntimeLocation
\li DesktopServices.ConfigLocation
\li DesktopServices.DownloadLocation
- \li DesktopServices.GenericCacheLocation
\li DesktopServices.GenericConfigLocation
+ \li DesktopServices.AppDataLocation
+ \li DesktopServices.AppConfigLocation
+ \li DesktopServices.PublicShareLocation
+ \li DesktopServices.TemplatesLocation
\endlist
The enum values correspond to the values of the
diff --git a/doc/scripting-api/qfiledialog.qdoc b/doc/scripting-api/qfiledialog.qdoc
index e6cdfdb24..6fd01de3d 100644
--- a/doc/scripting-api/qfiledialog.qdoc
+++ b/doc/scripting-api/qfiledialog.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
@@ -42,17 +42,19 @@
*/
/*!
- \qmlmethod string QFileDialog::getExistingDirectory(string caption, string dir)
+ \qmlmethod string QFileDialog::getExistingDirectory(string caption, string dir, string identifier)
Returns an existing directory selected by the user.
The dialog's working directory is set to \a dir, and the caption is set to
\a caption. Either of these may be an empty string, in which case the
current directory and a default caption will be used, respectively.
+ The \a identifier is used in command line interface to allow to identify
+ specific file dialogs for automatic answer.
*/
/*!
- \qmlmethod string QFileDialog::getOpenFileName(string caption, string dir, string filter)
+ \qmlmethod string QFileDialog::getOpenFileName(string caption, string dir, string filter, string identifier)
Returns an existing file selected by the user. If the user selects
\uicontrol Cancel, returns a null string.
@@ -64,6 +66,9 @@
file name, the file will be selected. Only files that match the specified
\a filter are shown. Either of these may be an empty string.
+ The \a identifier is used in command line interface to allow to identify
+ specific file dialogs for automatic answer.
+
To specify multiple filters, separate them with two semicolons (;;). For
example:
diff --git a/doc/scripting-api/qinstaller.qdoc b/doc/scripting-api/qinstaller.qdoc
index 9fef274ce..440212172 100644
--- a/doc/scripting-api/qinstaller.qdoc
+++ b/doc/scripting-api/qinstaller.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
**
diff --git a/doc/scripting-api/qsettings.qdoc b/doc/scripting-api/qsettings.qdoc
new file mode 100644
index 000000000..04a0fe674
--- /dev/null
+++ b/doc/scripting-api/qsettings.qdoc
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Installer Framework.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \qmltype QSettings
+ \inqmlmodule scripting
+
+ \brief Provides enums for accessing QSettings format in Windows.
+
+ On Windows, a registry key can be asked using \l{installer::value}.
+ For accessing the 32-bit system registry from a 64-bit application running
+ on 64-bit Windows, use \l{QSettings::Registry32Format}{QSettings.Registry32Format}.
+ For accessing the 64-bit system registry from a 32-bit application running
+ on 64-bit Windows, use \l{QSettings::Registry64Format}{QSettings.Registry64Format}.
+ By default the \l{QSettings::NativeFormat}{QSettings.NativeFormat}is used.
+*/
+
+/*!
+ \qmlproperty enumeration QSettings::Format
+
+ The \l{installer::value} method can take one of the following enums as an argument:
+
+ \list
+ \li \l{QSettings::NativeFormat}{QSettings.NativeFormat}
+ \li \l{QSettings::Registry32Format}{QSettings.Registry32Format}
+ \li \l{QSettings::Registry64Format}{QSettings.Registry64Format}
+ \li \l{QSettings::IniFormat}{QSettings.IniFormat}
+ \li \l{QSettings::InvalidFormat}{QSettings.InvalidFormat}
+ \endlist
+
+ The enum values correspond to the values of the
+ \l{QSettings::Format} enum with the same names.
+*/