summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@digia.com>2013-09-06 11:52:53 +0200
committerLeena Miettinen <riitta-leena.miettinen@digia.com>2013-09-23 09:46:57 +0200
commite1fb42d94db2a1f249a7ffc85ab8f8a2744ac0d8 (patch)
treec95200751e9ab95f498aa1b87b7a23dab2e04aae
parentac01fd03f71a0fc3a395c2a1f18b5ec40a08d32e (diff)
downloadqt-creator-e1fb42d94db2a1f249a7ffc85ab8f8a2744ac0d8.tar.gz
Doc: edit qmljs docs
Use standard wording, fix capitalization, typos, and style and grammar issues. Change-Id: Iac3faa59ef32aa2a8ec1857aed0d861701cbfbe7 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
-rw-r--r--src/libs/qmljs/parser/qmlerror.cpp4
-rw-r--r--src/libs/qmljs/persistenttrie.cpp41
-rw-r--r--src/libs/qmljs/qmljsdocument.cpp2
-rw-r--r--src/libs/qmljs/qmljsinterpreter.cpp5
4 files changed, 27 insertions, 25 deletions
diff --git a/src/libs/qmljs/parser/qmlerror.cpp b/src/libs/qmljs/parser/qmlerror.cpp
index b097eea812..09e90df4ef 100644
--- a/src/libs/qmljs/parser/qmlerror.cpp
+++ b/src/libs/qmljs/parser/qmlerror.cpp
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
^
\endcode
- Note that the QtQuick 1 version is named QDeclarativeError
+ \note The QtQuick 1 version is named QDeclarativeError.
\sa QQuickView::errors(), QmlComponent::errors()
*/
@@ -137,7 +137,7 @@ bool QmlError::isValid() const
}
/*!
- Returns the url for the file that caused this error.
+ Returns the URL for the file that caused this error.
*/
QUrl QmlError::url() const
{
diff --git a/src/libs/qmljs/persistenttrie.cpp b/src/libs/qmljs/persistenttrie.cpp
index e12fa90875..74c9593c7d 100644
--- a/src/libs/qmljs/persistenttrie.cpp
+++ b/src/libs/qmljs/persistenttrie.cpp
@@ -34,27 +34,27 @@
persistent (not on disk but in memory).
This means that several versions can coexist, as adding an element
- is non destructive, and as much as possible is shared.
+ is non-destructive, and as much as possible is shared.
- The trie is only *partially* ordered, it preserves the order
- of what was inserted as much as possible.
+ The trie is only \e partially ordered. It preserves the order
+ of the inserted elements as much as possible.
This makes some operations a bit slower, but is considered
a feature.
This means the order in which you insert the elements matters.
An important use case for this is completions, and several
strategies are available.
- Results order can be improved using the matching strength
+ Results order can be improved by using the matching strength.
All const operations are threadsafe, and copy is cheap (only a
QSharedPointer copy).
- Assigning a shared pointer is *not* threadsafe, so updating the
- head is *not* thread safe, and should be done only on a local
+ Assigning a shared pointer is not threadsafe, so updating the
+ head is not threadsafe, and should be done only on a local
instance (shared pointer used only from a single thread), or
protected with locks.
- This is a two level implementation, based on a fully functional
+ This is a two-level implementation, based on a fully functional
implementation (PersistentTrie::Trie), which could be private
but was left public because deemed useful.
@@ -570,10 +570,10 @@ QStringList Trie::stringList() const
}
/*!
- \brief inserts into the current trie.
+ Inserts into the current trie.
- Non thread safe, only use this on an instance that is used only
- in a single theread, or that is protected by locks.
+ Non threadsafe. Only use this function on an instance that is used only
+ in a single thread, or that is protected by locks.
*/
void Trie::insert(const QString &value)
{
@@ -581,10 +581,10 @@ void Trie::insert(const QString &value)
}
/*!
- \brief intesects into the current trie.
+ Intersects into the current trie.
- Non thread safe, only use this on an instance that is used only
- in a single theread, or that is protected by locks.
+ Non threadsafe. Only use this function on an instance that is used only
+ in a single thread, or that is protected by locks.
*/
void Trie::intersect(const Trie &v)
{
@@ -592,10 +592,10 @@ void Trie::intersect(const Trie &v)
}
/*!
- \brief merges the given trie into the current one.
+ Merges the given trie into the current one.
- Non thread safe, only use this on an instance that is used only
- in a single theread, or that is protected by locks.
+ Non threadsafe. Only use this function on an instance that is used only
+ in a single thread, or that is protected by locks.
*/
void Trie::merge(const Trie &v)
{
@@ -643,11 +643,12 @@ Trie Trie::replaceF(const QHash<QString, QString> &replacements) const
}
/*!
- Returns a number defining how well the serachStr matches str.
- Quite simplistic, looks only at the first match, and prefers contiguos
+ Returns a number defining how well \a searchStr matches \a str.
+
+ Quite simplistic, looks only at the first match, and prefers contiguous
matches, or matches to capitalized or separated words.
- Match to the last char is also preferred.
+ Match to the last character is also preferred.
*/
int matchStrength(const QString &searchStr, const QString &str)
{
@@ -691,7 +692,7 @@ public:
}
/*!
- returns a number defining the matching strength of res to the given searchStr
+ Returns a number defining the matching strength of \a res to \a searchStr.
*/
QStringList matchStrengthSort(const QString &searchStr, QStringList &res)
{
diff --git a/src/libs/qmljs/qmljsdocument.cpp b/src/libs/qmljs/qmljsdocument.cpp
index b75a74aae9..942882ef1a 100644
--- a/src/libs/qmljs/qmljsdocument.cpp
+++ b/src/libs/qmljs/qmljsdocument.cpp
@@ -61,7 +61,7 @@ using namespace QmlJS::AST;
\sa Snapshot
A LibraryInfo is created when the ModelManagerInterface finds
- a Qml library and parses the qmldir file. The instance holds information about
+ a QML library and parses the qmldir file. The instance holds information about
which Components the library provides and which plugins to load.
The ModelManager will try to extract detailed information about the types
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index c74d5c4086..ddecffd2f1 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -369,9 +369,10 @@ const CppComponentValue *CppComponentValue::prototype() const
}
/*!
- \returns a list started by this object and followed by all its prototypes
+ Returns a list started by this object and followed by all its prototypes.
- Prefer to use this over calling prototype() in a loop, as it avoids cycles.
+ Use this function rather than calling prototype() in a loop, as it avoids
+ cycles.
*/
QList<const CppComponentValue *> CppComponentValue::prototypes() const
{