summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorFrerich Raabe <raabe@froglogic.com>2015-09-27 14:16:09 +0200
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-12-08 13:06:21 +0000
commitf747e559e12e4a9d675e26070d7d0c510d9106c8 (patch)
tree88678f919f25d0f6c3684a7c400e7eeba27faa61 /doc
parentd129ccdb8aa63185ea939068d892b27c634e4842 (diff)
Implemented installer.readFile()
For reading an external file using a specific encoding. This is convenient for having installers show the current configuration (e.g. effective license key) in case the configuration is stored in plain files as opposed to using e.g. the Windows registry. Change-Id: I87f8583b4cb192c4bd8b62a03f292a5cbefd52d8 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/scripting-api/packagemanagercore.qdoc11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/scripting-api/packagemanagercore.qdoc b/doc/scripting-api/packagemanagercore.qdoc
index aeb116329..65b72c9c4 100644
--- a/doc/scripting-api/packagemanagercore.qdoc
+++ b/doc/scripting-api/packagemanagercore.qdoc
@@ -334,6 +334,17 @@
*/
/*!
+ \qmlmethod boolean installer::readFile(string filePath, string codecName)
+
+ Returns the contents of the file \a filePath using the encoding specified
+ by \a codecName. The file is read in the text mode, that is, end-of-line
+ terminators are translated to the local encoding.
+
+ \note If the file does not exist or an error occurs while reading the file, an
+ empty string is returned.
+*/
+
+/*!
\qmlmethod boolean installer::fileExists(string filePath)
Returns \c true if the \a filePath exists; otherwise returns \c false.