summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@digia.com>2013-09-26 10:39:18 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-09-26 16:45:29 +0200
commitb62ee41ca37b639e3e7f235662ca1f4c3253fd9b (patch)
tree172575936cd5c3b3f49b8dc1bb24f664c78d6c0a /doc
parent0dc05084eec0a4af57614efaaac22c4dbf08c366 (diff)
downloadqbs-b62ee41ca37b639e3e7f235662ca1f4c3253fd9b.tar.gz
Doc: edited JavaScript extensions docs
Fixed grammar and style issues and typos. Change-Id: Ic80bd3f9fb96047d390ff0cdcbc382a4939a9892 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/jsextensions/jsextension-file.qdoc12
-rw-r--r--doc/reference/jsextensions/jsextension-fileinfo.qdoc18
-rw-r--r--doc/reference/jsextensions/jsextension-process.qdoc17
-rw-r--r--doc/reference/jsextensions/jsextension-textfile.qdoc13
4 files changed, 33 insertions, 27 deletions
diff --git a/doc/reference/jsextensions/jsextension-file.qdoc b/doc/reference/jsextensions/jsextension-file.qdoc
index 5fe0e10dd..4177edbfc 100644
--- a/doc/reference/jsextensions/jsextension-file.qdoc
+++ b/doc/reference/jsextensions/jsextension-file.qdoc
@@ -32,20 +32,20 @@
\page jsextension-file.html
\ingroup list-of-builtin-services
- \title The File Service
- \brief Provides files system operations.
+ \title File Service
+ \brief Provides operations on the file system.
The \c File service offers limited access to the file system for operations such as copying
or removing files.
- \section1 Making the service available
- In order to gain access to these operations, you need to import the service using the
+ \section1 Making the Service Available
+ To gain access to file system operations, import the service using the
following statement at the top of your project file:
\code
import qbs.File
\endcode
- \section1 Available operations
+ \section1 Available Operations
\section2 copy
\code
@@ -53,7 +53,7 @@
\endcode
Copies \c sourceFilePath to \c targetFilePath. Any directory components in \c targetFilePath
that do not yet exist will be created. If \c sourceFilePath is a directory, a recursive
- copy will be made. If an error happens, a JavaScript exception will be thrown.
+ copy will be made. If an error occurs, a JavaScript exception will be thrown.
\note \c targetFilePath must be the counterpart of \c sourceFilePath at the new location,
\b{not} the new parent directory. This allows the copy to have a different name and is true
even if \c sourceFilePath is a directory.
diff --git a/doc/reference/jsextensions/jsextension-fileinfo.qdoc b/doc/reference/jsextensions/jsextension-fileinfo.qdoc
index 8535612ed..f1c92295a 100644
--- a/doc/reference/jsextensions/jsextension-fileinfo.qdoc
+++ b/doc/reference/jsextensions/jsextension-fileinfo.qdoc
@@ -32,21 +32,21 @@
\page jsextension-fileinfo.html
\ingroup list-of-builtin-services
- \title The FileInfo Service
+ \title FileInfo Service
\brief Provides operations on file paths.
- The \c FileInfo service offers various operations on file paths such as turning absolute
- paths into relative ones, splitting a path into its components and so on.
+ The \c FileInfo service offers various operations on file paths, such as turning absolute
+ paths into relative ones, splitting a path into its components, and so on.
- \section1 Making the service available
+ \section1 Making the Service Available
- In order to gain access to these operations, you need to import the service using the
+ In order to gain access to file path operations, you need to import the service using the
following statement at the top of your project file:
\code
import qbs.FileInfo
\endcode
- \section1 Available operations
+ \section1 Available Operations
\section2 baseName
\code
@@ -64,7 +64,8 @@
\code
FileInfo.fileName(filePath)
\endcode
- Returns the last component of \c filePath, i.e. everything after the last '/' character.
+ Returns the last component of \c filePath, that is, everything after the
+ last '/' character.
\section2 fromWindowsSeparators
\code
@@ -88,7 +89,8 @@
\code
FileInfo.path(filePath)
\endcode
- Returns the part of \c filePath that is not the file name, i.e. everything up to
+ Returns the part of \c filePath that is not the file name, that is,
+ everything up to
(but not including) the last '/' character. If \c filePath is just a file name, then '.'
is returned. If \c filePath ends with a '/' character, then the file name is assumed to be empty
for the purpose of the above definition.
diff --git a/doc/reference/jsextensions/jsextension-process.qdoc b/doc/reference/jsextensions/jsextension-process.qdoc
index 2bd0a4101..a40a79b9a 100644
--- a/doc/reference/jsextensions/jsextension-process.qdoc
+++ b/doc/reference/jsextensions/jsextension-process.qdoc
@@ -32,19 +32,21 @@
\page jsextension-process.html
\ingroup list-of-builtin-services
- \title The Process Service
- \brief Allows to start external processes.
+ \title Process Service
+ \brief Allows you to start external processes.
- The \c Process service allows you to start processes, track their output and so on.
+ The \c Process service allows you to start processes, track their output,
+ and so on.
- \section1 Making the service available
- In order to gain access to these operations, you need to import the service using the
+ \section1 Making the Service Available
+ In order to gain access to process management operations, you need to import
+ the service using the
following statement at the top of your project file:
\code
import qbs.Process
\endcode
- \section1 Available operations
+ \section1 Available Operations
\section2 Constructor
\code
@@ -64,7 +66,8 @@
exec(filePath, arguments, throwOnError)
\endcode
Executes the program at \c filePath with the given argument list and blocks until the
- process is finished. If an error occors (e.g. there is no executable file at \c filePath)
+ process is finished. If an error occurs (for example, there is no executable
+ file at \c filePath)
and \c throwOnError is true, then a JavaScript exception will be thrown. Otherwise
(the default), -1 will be returned in case of an error. The normal return code is the exit code
of the process.
diff --git a/doc/reference/jsextensions/jsextension-textfile.qdoc b/doc/reference/jsextensions/jsextension-textfile.qdoc
index 4bc022240..892303dfa 100644
--- a/doc/reference/jsextensions/jsextension-textfile.qdoc
+++ b/doc/reference/jsextensions/jsextension-textfile.qdoc
@@ -32,13 +32,14 @@
\page jsextension-textfile.html
\ingroup list-of-builtin-services
- \title The TextFile Service
+ \title TextFile Service
\brief Provides read and write operations on text files.
The \c TextFile service allows you to read from and write into text files.
- \section1 Making the service available
- In order to gain access to these operations, you need to import the service using the
+ \section1 Making the Service Available
+ In order to gain access to text file operations, you need to import the
+ service using the
following statement at the top of your project file:
\code
import qbs.TextFile
@@ -79,20 +80,20 @@
readLine()
\endcode
Reads one line of text from the file and returns it. The returned string does not contain
- the newline character(s).
+ the newline characters.
\section2 setCodec
\code
setCodec(codec)
\endcode
Sets the text codec to \c codec. The supported codecs are the same as for \c QTextCodec,
- e.g. "UTF-8", "UTF-16", "ISO 8859-1" and so on.
+ for example: "UTF-8", "UTF-16", and "ISO 8859-1".
\section2 truncate
\code
truncate()
\endcode
- Truncates the file, i.e. gives it a size of zero, removing all content.
+ Truncates the file, that is, gives it the size of zero, removing all content.
\section2 write
\code