summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-01-30 13:50:47 +0100
committerLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-01-30 14:47:33 +0000
commitd7bdbb1b3a49873ab8feae16d4e1a9ae09bf17b5 (patch)
tree7e8f1fd9ee084f98d5df744cd115032f223338e7 /src/libs
parent93a10096f82b9a187fc5bf31a65394033696fb72 (diff)
Doc: add docs for arguments and return values
To get rid of QDoc errors. Change-Id: I4932f1f3ff5fab87eebf24536d63be550582b195 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/packagemanagercore.cpp27
-rw-r--r--src/libs/installer/packagemanagergui.cpp2
-rw-r--r--src/libs/installer/scriptengine.cpp7
-rw-r--r--src/libs/kdtools/kdupdaterapplication.cpp8
-rw-r--r--src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp5
-rw-r--r--src/libs/kdtools/kdupdaterpackagesinfo.cpp16
-rw-r--r--src/libs/kdtools/kdupdaterupdate.cpp3
-rw-r--r--src/libs/kdtools/kdupdaterupdatefinder.cpp3
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperation.cpp5
9 files changed, 52 insertions, 24 deletions
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index 8600dc114..1b59b1dcd 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -1137,7 +1137,8 @@ bool PackageManagerCore::testChecksum() const
}
/*!
- Defines if the downloader should try to download sha1 checksums for archives.
+ The \a test argument determines whether the downloader should try to
+ download SHA-1 checksums for archives.
*/
void PackageManagerCore::setTestChecksum(bool test)
{
@@ -1155,8 +1156,9 @@ ScriptEngine *PackageManagerCore::controlScriptEngine() const
}
/*!
- Appends a component as root component to the internal storage for installer or package manager components.
- To append a component as a child to an already existing component, use Component::appendComponent(). Emits
+ Appends \a component as the root component to the internal storage for
+ installer or package manager components. To append a component as a child to
+ an already existing component, use Component::appendComponent(). Emits
the componentAdded() signal.
*/
void PackageManagerCore::appendRootComponent(Component *component)
@@ -1222,7 +1224,8 @@ QList<Component *> PackageManagerCore::components(ComponentTypes mask) const
}
/*!
- Appends a component to the internal storage for updater components. Emits the componentAdded() signal.
+ Appends \a component to the internal storage for updater components. Emits
+ the componentAdded() signal.
*/
void PackageManagerCore::appendUpdaterComponent(Component *component)
{
@@ -1363,9 +1366,13 @@ QString PackageManagerCore::componentsToInstallError() const
}
/*!
- Returns the reason why the component needs to be installed. Reasons can be: The component was scheduled
- for installation, the component was added as a dependency for an other component or added as an automatic
- dependency.
+ Returns the reason why \a component needs to be installed:
+
+ \list
+ \li The component was scheduled for installation.
+ \li The component was added as a dependency for another component.
+ \li The component was added as an automatic dependency.
+ \endlist
*/
QString PackageManagerCore::installReason(Component *component) const
{
@@ -1373,8 +1380,10 @@ QString PackageManagerCore::installReason(Component *component) const
}
/*!
- Returns a list of components that depend on \a component. The list can be empty. Note: Auto
- installed dependencies are not resolved.
+ Returns a list of components that depend on \a _component. The list can be
+ empty.
+
+ \note Automatic dependencies are not resolved.
*/
QList<Component*> PackageManagerCore::dependees(const Component *_component) const
{
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index e3cb57bdd..9bda27f75 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -416,7 +416,7 @@ void PackageManagerGui::setValidatorForCustomPageRequested(Component *component,
}
/*!
- Loads a script to perform the installation non-interactively.
+ Loads the script specified by \a scriptPath to perform the installation non-interactively.
Throws QInstaller::Error if the script is not readable or it cannot be
parsed.
*/
diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp
index 6a6a18fd8..057ce9c85 100644
--- a/src/libs/installer/scriptengine.cpp
+++ b/src/libs/installer/scriptengine.cpp
@@ -682,12 +682,13 @@ QJSValue ScriptEngine::loadInContext(const QString &context, const QString &file
}
/*!
- Tries to call the method with \a name within the script and returns the result. If the method
- doesn't exist or is not callable, an undefined result is returned. If the call to the method
+ Tries to call the method specified by \a methodName with the arguments specified by
+ \a arguments within the script and returns the result. If the method does not exist or
+ is not callable, an undefined result is returned. If the call to the method
succeeds and the return value is still undefined, a null value will be returned instead.
If the method call has an exception, its string representation is thrown as an Error exception.
- \note The method is not called, if the current script context is the same method, to avoid
+ \note The method is not called if \a scriptContext is the same method, to avoid
infinite recursion.
*/
QJSValue ScriptEngine::callScriptMethod(const QJSValue &scriptContext, const QString &methodName,
diff --git a/src/libs/kdtools/kdupdaterapplication.cpp b/src/libs/kdtools/kdupdaterapplication.cpp
index bd766b436..43db97cfb 100644
--- a/src/libs/kdtools/kdupdaterapplication.cpp
+++ b/src/libs/kdtools/kdupdaterapplication.cpp
@@ -186,7 +186,8 @@ QString Application::applicationVersion() const
}
/*!
- Adds update source info to this class.
+ Adds the \a name, \a title, \a description, \a url, and \a priority of the
+ update source to this class.
\sa KDUpdater::UpdateSourceInfo
\sa KDUpdater::UpdateSourcesInfo
@@ -232,8 +233,9 @@ PackagesInfo* Application::packagesInfo() const
}
/*!
- Sets the file name of the update sources XML file for this application. By default, this is
- assumed to be UpdateSources.xml in the application directory.
+ Sets \a fileName as the file name of the update sources XML file for this
+ application. By default, this is assumed to be UpdateSources.xml in the
+ application directory.
\sa KDUpdater::UpdateSourcesInfo::setFileName()
*/
diff --git a/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp b/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp
index 39e6ba952..179a60247 100644
--- a/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp
+++ b/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp
@@ -121,8 +121,9 @@ bool FileDownloaderFactory::isSupportedScheme(const QString &scheme)
}
/*!
- Returns a new instance of a KDUpdater::FileDownloader subclass. The subclass is instantiated
- based on the communication protocol string stored in \a scheme.
+ Returns a new instance of a KDUpdater::FileDownloader subclass. The
+ instantiation of a subclass depends on the communication protocol string
+ stored in \a scheme with the parent \a parent.
\note Ownership of the created object remains with the programmer.
*/
diff --git a/src/libs/kdtools/kdupdaterpackagesinfo.cpp b/src/libs/kdtools/kdupdaterpackagesinfo.cpp
index 6eb32f1e3..b19146660 100644
--- a/src/libs/kdtools/kdupdaterpackagesinfo.cpp
+++ b/src/libs/kdtools/kdupdaterpackagesinfo.cpp
@@ -325,7 +325,11 @@ void PackagesInfo::refresh()
}
/*!
- Marks the package with \a name and \a version as installed.
+ Marks the package specified by \a name as installed. Sets the values of
+ \a version, \a title, \a description, \a dependencies, \a forcedInstallation,
+ \a virtualComp, \a uncompressedSize, and \a inheritVersionFrom for the
+ package.
+
*/
bool PackagesInfo::installPackage(const QString &name, const QString &version,
const QString &title, const QString &description,
@@ -353,8 +357,10 @@ bool PackagesInfo::installPackage(const QString &name, const QString &version,
}
/*!
- Updates the package and sets the package name to \a name, the version to \a version and the
- last update date to \a date.
+ Updates the package specified by \a name and sets its version to \a version
+ and the last update date to \a date.
+
+ Returns \c false if the package is not found.
*/
bool PackagesInfo::updatePackage(const QString &name, const QString &version, const QDate &date)
{
@@ -370,7 +376,9 @@ bool PackagesInfo::updatePackage(const QString &name, const QString &version, co
}
/*!
- Remove the package with \a name.
+ Removes the package specified by \a name.
+
+ Returns \c false if the package is not found.
*/
bool PackagesInfo::removePackage(const QString &name)
{
diff --git a/src/libs/kdtools/kdupdaterupdate.cpp b/src/libs/kdtools/kdupdaterupdate.cpp
index e1f5b50db..eb260153f 100644
--- a/src/libs/kdtools/kdupdaterupdate.cpp
+++ b/src/libs/kdtools/kdupdaterupdate.cpp
@@ -60,7 +60,8 @@ Update::Update(int priority, const QUrl &sourceInfoUrl, const QHash<QString, QVa
}
/*!
- Returns data whose name is given in parameter, or an invalid QVariant if the data doesn't exist.
+ Returns the data specified by \a name, or an invalid \a defaultValue if the
+ data does not exist.
*/
QVariant Update::data(const QString &name, const QVariant &defaultValue) const
{
diff --git a/src/libs/kdtools/kdupdaterupdatefinder.cpp b/src/libs/kdtools/kdupdaterupdatefinder.cpp
index e6c9044b8..7c155fff9 100644
--- a/src/libs/kdtools/kdupdaterupdatefinder.cpp
+++ b/src/libs/kdtools/kdupdaterupdatefinder.cpp
@@ -460,7 +460,8 @@ UpdateFinder::Private::Resolution UpdateFinder::Private::checkPriorityAndVersion
//
/*!
- Constructs an update finder for a given KDUpdater::Application.
+ Constructs an update finder for the KDUpdater::Application specified by
+ \a application.
*/
UpdateFinder::UpdateFinder(Application *application)
: Task(QLatin1String("UpdateFinder"), Stoppable, application),
diff --git a/src/libs/kdtools/kdupdaterupdateoperation.cpp b/src/libs/kdtools/kdupdaterupdateoperation.cpp
index 67b10bedb..0693f768a 100644
--- a/src/libs/kdtools/kdupdaterupdateoperation.cpp
+++ b/src/libs/kdtools/kdupdaterupdateoperation.cpp
@@ -193,6 +193,11 @@ struct StartsWith
QString m_searchTerm;
};
+/*!
+ Searches the arguments for the key specified by \a key. If it can find the
+ key, it returns the value set for it. Otherwise, it returns \a defaultValue.
+ Arguments are specified in the following form: \c{key=value}.
+*/
QString UpdateOperation::argumentKeyValue(const QString &key, const QString &defaultValue) const
{