summaryrefslogtreecommitdiffstats
path: root/doc/scripting-api
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2022-05-18 12:56:48 +0300
committerKatja Marttila <katja.marttila@qt.io>2022-05-27 10:21:40 +0300
commit8892e397c1b7f0c88713b787c7fa4f17dd89c064 (patch)
tree219ce35ec97dc08ff76ee30b4e54031d555c90d2 /doc/scripting-api
parentfc37cb9824b1c73a88f9a1e495e814bafa19fc8d (diff)
Windows: Allow asking installer value with different formats
This change expands installer.value() -function allowing QSettings::Format setting when asking registry key. Windows 32bit registry keys on 64bit Windows and 64bit application can be accessed using QSettings::Registry32Format. Window 64bit registry keys on 64bit windows and 32bit application can be accessed using QSettings::Registy64Format. If no format is set, QSettings::NativeFormat is used. Task-number: QTIFW-2657 Change-Id: Ie30e31886526db5b9d72793d5883c11bd1910737 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'doc/scripting-api')
-rw-r--r--doc/scripting-api/packagemanagercore.qdoc14
-rw-r--r--doc/scripting-api/qsettings.qdoc57
2 files changed, 67 insertions, 4 deletions
diff --git a/doc/scripting-api/packagemanagercore.qdoc b/doc/scripting-api/packagemanagercore.qdoc
index 3466c70f6..b14fd957f 100644
--- a/doc/scripting-api/packagemanagercore.qdoc
+++ b/doc/scripting-api/packagemanagercore.qdoc
@@ -754,10 +754,16 @@
*/
/*!
- \qmlmethod string installer::value(string key, string defaultValue = "")
-
- 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.
+ \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. 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/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.
+*/