summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-09-16 18:14:44 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2020-09-21 06:44:32 +0000
commit17f3e4fb3a2e560131527f91ca64944667223bd9 (patch)
tree483eb0e64b5cf4adcab969bedaa88dba3d2b83ce
parent7b16ab246d5c8241f08c0ffa3a87c9803ec4aa50 (diff)
Doc: Reduce the amount of documentation warnings
Miscellaneous fixes to missing function documentation, undocumented parameters, namespace scope etc. As 5.12.7 based qdoc gives a lot more warnings about code missing documentation, mark undocumented implementation details with \internal command. Also some spelling fixes to related parts of documentation. Task-number: QTIFW-1483 Change-Id: Ibf5d1e5098713acbd152c5b61ea4f46cc11feb4b Reviewed-by: Katja Marttila <katja.marttila@qt.io>
-rw-r--r--src/libs/installer/component_p.cpp30
-rw-r--r--src/libs/installer/componentmodel.cpp4
-rw-r--r--src/libs/installer/downloadarchivesjob.cpp8
-rw-r--r--src/libs/installer/extractarchiveoperation.cpp13
-rw-r--r--src/libs/installer/fileio.cpp51
-rw-r--r--src/libs/installer/fileutils.cpp82
-rw-r--r--src/libs/installer/fileutils.h14
-rw-r--r--src/libs/installer/globals.cpp149
-rw-r--r--src/libs/installer/init.cpp4
-rw-r--r--src/libs/installer/lib7z_facade.cpp12
-rw-r--r--src/libs/installer/metadatajob.cpp8
-rw-r--r--src/libs/installer/packagesource.cpp6
-rw-r--r--src/libs/installer/progresscoordinator.cpp2
-rw-r--r--src/libs/installer/protocol.cpp20
-rw-r--r--src/libs/installer/proxycredentialsdialog.cpp6
-rw-r--r--src/libs/installer/qinstallerglobal.cpp72
-rw-r--r--src/libs/installer/repository.cpp11
-rw-r--r--src/libs/installer/repositorycategory.cpp6
-rw-r--r--src/libs/installer/settings.cpp7
-rw-r--r--src/libs/installer/utils.cpp46
-rw-r--r--src/libs/kdtools/sysinfo_x11.cpp15
-rw-r--r--src/libs/kdtools/updatefinder.cpp2
-rw-r--r--src/libs/kdtools/updateoperation.cpp8
-rw-r--r--src/libs/kdtools/updater.cpp40
24 files changed, 565 insertions, 51 deletions
diff --git a/src/libs/installer/component_p.cpp b/src/libs/installer/component_p.cpp
index 5a5284a4b..8be0b1800 100644
--- a/src/libs/installer/component_p.cpp
+++ b/src/libs/installer/component_p.cpp
@@ -92,8 +92,8 @@ int ComponentModelHelper::childCount() const
}
/*!
- Returns the component at index position in the list. Index must be a valid position in
- the list (i.e., index >= 0 && index < childCount()). Otherwise it returns 0.
+ Returns the component at \a index position in the list. Index must be a valid position in
+ the list, for example \c{index >= 0 && index < childCount()}. Otherwise it returns 0.
*/
Component *ComponentModelHelper::childAt(int index) const
{
@@ -123,7 +123,7 @@ QList<Component*> ComponentModelHelper::childItems() const
}
/*!
- Determines if the installation status of the component can be changed. The default value is true.
+ Determines if the installation status of the component can be changed. The default return value is \c true.
*/
bool ComponentModelHelper::isEnabled() const
{
@@ -131,7 +131,7 @@ bool ComponentModelHelper::isEnabled() const
}
/*!
- Enables or disables the ability to change the installation status of the components.
+ Enables or disables the ability to change the installation status of the components based on \a enabled.
*/
void ComponentModelHelper::setEnabled(bool enabled)
{
@@ -140,7 +140,7 @@ void ComponentModelHelper::setEnabled(bool enabled)
/*!
Returns whether the component is tri-state; that is, if it's checkable with three separate states.
- The default value is false.
+ The default value is \c false.
*/
bool ComponentModelHelper::isTristate() const
{
@@ -148,7 +148,7 @@ bool ComponentModelHelper::isTristate() const
}
/*!
- Sets whether the component is tri-state. If tri-state is true, the component is checkable with three
+ Sets whether the component is tri-state based on \a tristate . If tri-state is \c true, the component is checkable with three
separate states; otherwise, the component is checkable with two states.
Note: this also requires that the component is checkable. \sa isCheckable()
@@ -159,7 +159,7 @@ void ComponentModelHelper::setTristate(bool tristate)
}
/*!
- Returns whether the component is user-checkable. The default value is true.
+ Returns whether the component is user-checkable. The default value is \c true.
*/
bool ComponentModelHelper::isCheckable() const
{
@@ -167,7 +167,7 @@ bool ComponentModelHelper::isCheckable() const
}
/*!
- Sets whether the component is user-checkable. If checkable is true, the component can be checked by the
+ Sets whether the component is user-checkable. If \a checkable is \c true, the component can be checked by the
user; otherwise, the user cannot check the component. The delegate will render a checkable component
with a check box next to the component's text.
*/
@@ -182,7 +182,7 @@ void ComponentModelHelper::setCheckable(bool checkable)
}
/*!
- Returns whether the component is selectable by the user. The default value is true.
+ Returns whether the component is selectable by the user. The default value is \c true.
*/
bool ComponentModelHelper::isSelectable() const
{
@@ -190,7 +190,7 @@ bool ComponentModelHelper::isSelectable() const
}
/*!
- Sets whether the component is selectable. If selectable is true, the component can be selected by the
+ Sets whether the component is selectable. If \a selectable is \c true, the component can be selected by the
user; otherwise, the user cannot select the component.
*/
void ComponentModelHelper::setSelectable(bool selectable)
@@ -207,7 +207,7 @@ bool ComponentModelHelper::isExpandedByDefault() const
}
/*!
- Sets whether the component is expanded by default. The default value is \c false.
+ Sets whether the component is expanded by default based on \a expandedByDefault. The default value is \c false.
*/
void ComponentModelHelper::setExpandedByDefault(bool expandedByDefault)
{
@@ -237,7 +237,7 @@ Qt::ItemFlags ComponentModelHelper::flags() const
}
/*!
- Sets the item flags for the component to flags. The item flags determine how the user can interact with
+ Sets the item flags for the component to \a flags. The item flags determine how the user can interact with
the component. This is often used to disable an component.
*/
void ComponentModelHelper::setFlags(Qt::ItemFlags flags)
@@ -254,7 +254,7 @@ Qt::CheckState ComponentModelHelper::checkState() const
}
/*!
- Sets the check state of the component to be state.
+ Sets the check state of the component to be \a state.
*/
void ComponentModelHelper::setCheckState(Qt::CheckState state)
{
@@ -262,7 +262,7 @@ void ComponentModelHelper::setCheckState(Qt::CheckState state)
}
/*!
- Returns the component's data for the given role, or an invalid QVariant if there is no data for role.
+ Returns the component's data for the given \a role, or an invalid QVariant if there is no data for role.
*/
QVariant ComponentModelHelper::data(int role) const
{
@@ -270,7 +270,7 @@ QVariant ComponentModelHelper::data(int role) const
}
/*!
- Sets the component's data for the given role to the specified value.
+ Sets the component's data for the given \a role to the specified \a value.
*/
void ComponentModelHelper::setData(const QVariant &value, int role)
{
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index 69c709060..45e27ba4a 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -58,14 +58,14 @@ namespace QInstaller {
*/
/*!
- \fn void ComponentModel::checkStateChanged(const QModelIndex &index)
+ \fn void QInstaller::ComponentModel::checkStateChanged(const QModelIndex &index)
This signal is emitted whenever the checked state of a component is changed. The \a index value
indicates the QModelIndex representation of the component as seen from the model.
*/
/*!
- \fn void ComponentModel::checkStateChanged(QInstaller::ComponentModel::ModelState state)
+ \fn void QInstaller::ComponentModel::checkStateChanged(QInstaller::ComponentModel::ModelState state)
This signal is emitted whenever the checked state of a model is changed after all state
calculations have taken place. The \a state is a combination of \c ModelStateFlag values
diff --git a/src/libs/installer/downloadarchivesjob.cpp b/src/libs/installer/downloadarchivesjob.cpp
index 4d9d6b325..5dbccc0b6 100644
--- a/src/libs/installer/downloadarchivesjob.cpp
+++ b/src/libs/installer/downloadarchivesjob.cpp
@@ -44,7 +44,7 @@ using namespace KDUpdater;
/*!
- Creates a new DownloadArchivesJob with \a parent.
+ Creates a new DownloadArchivesJob with parent \a core.
*/
DownloadArchivesJob::DownloadArchivesJob(PackageManagerCore *core)
: Job(core)
@@ -69,7 +69,7 @@ DownloadArchivesJob::~DownloadArchivesJob()
}
/*!
- Sets the archives to download. The first value of each pair contains the file name to register
+ Sets the \a archives to download. The first value of each pair contains the file name to register
the file in the installer's internal file system, the second one the source url.
*/
void DownloadArchivesJob::setArchivesToDownload(const QList<QPair<QString, QString> > &archives)
@@ -175,7 +175,7 @@ void DownloadArchivesJob::fetchNextArchive()
}
/*!
- Emits the global download progress during a single download in a lazy way (uses a timer to reduce to
+ Emits the global download \a progress during a single download in a lazy way (uses a timer to reduce to
much processChanged).
*/
void DownloadArchivesJob::emitDownloadProgress(double progress)
@@ -186,7 +186,7 @@ void DownloadArchivesJob::emitDownloadProgress(double progress)
}
/*!
- This is used to reduce the progressChanged signals.
+ This is used to reduce the \c progressChanged signals for \a event.
*/
void DownloadArchivesJob::timerEvent(QTimerEvent *event)
{
diff --git a/src/libs/installer/extractarchiveoperation.cpp b/src/libs/installer/extractarchiveoperation.cpp
index e3b9d5e36..ec7796f97 100644
--- a/src/libs/installer/extractarchiveoperation.cpp
+++ b/src/libs/installer/extractarchiveoperation.cpp
@@ -38,6 +38,19 @@
namespace QInstaller {
+/*!
+ \typedef QInstaller::Backup
+
+ Synonym for QPair<QString, QString>. Contains a pair
+ of an original and a generated backup filename for a file.
+*/
+
+/*!
+ \typedef QInstaller::BackupFiles
+
+ Synonym for QVector<Backup>.
+*/
+
ExtractArchiveOperation::ExtractArchiveOperation(PackageManagerCore *core)
: UpdateOperation(core)
{
diff --git a/src/libs/installer/fileio.cpp b/src/libs/installer/fileio.cpp
index dac2e4c50..6f55ba4ff 100644
--- a/src/libs/installer/fileio.cpp
+++ b/src/libs/installer/fileio.cpp
@@ -37,6 +37,9 @@
#include <QFileDevice>
#include <QString>
+/*!
+ \internal
+*/
qint64 QInstaller::retrieveInt64(QFileDevice *in)
{
qint64 n = 0;
@@ -44,11 +47,17 @@ qint64 QInstaller::retrieveInt64(QFileDevice *in)
return n;
}
+/*!
+ \internal
+*/
void QInstaller::appendInt64(QFileDevice *out, qint64 n)
{
QInstaller::blockingWrite(out, reinterpret_cast<const char*>(&n), sizeof(n));
}
+/*!
+ \internal
+*/
Range<qint64> QInstaller::retrieveInt64Range(QFileDevice *in)
{
const quint64 start = QInstaller::retrieveInt64(in);
@@ -56,22 +65,34 @@ Range<qint64> QInstaller::retrieveInt64Range(QFileDevice *in)
return Range<qint64>::fromStartAndLength(start, length);
}
+/*!
+ \internal
+*/
void QInstaller::appendInt64Range(QFileDevice *out, const Range<qint64> &r)
{
QInstaller::appendInt64(out, r.start());
QInstaller::appendInt64(out, r.length());
}
+/*!
+ \internal
+*/
QString QInstaller::retrieveString(QFileDevice *in)
{
return QString::fromUtf8(QInstaller::retrieveByteArray(in));
}
+/*!
+ \internal
+*/
void QInstaller::appendString(QFileDevice *out, const QString &str)
{
QInstaller::appendByteArray(out, str.toUtf8());
}
+/*!
+ \internal
+*/
QByteArray QInstaller::retrieveByteArray(QFileDevice *in)
{
QByteArray ba(QInstaller::retrieveInt64(in), '\0');
@@ -79,12 +100,18 @@ QByteArray QInstaller::retrieveByteArray(QFileDevice *in)
return ba;
}
+/*!
+ \internal
+*/
void QInstaller::appendByteArray(QFileDevice *out, const QByteArray &ba)
{
QInstaller::appendInt64(out, ba.size());
QInstaller::blockingWrite(out, ba.constData(), ba.size());
}
+/*!
+ \internal
+*/
QByteArray QInstaller::retrieveData(QFileDevice *in, qint64 size)
{
QByteArray ba(size, '\0');
@@ -92,12 +119,18 @@ QByteArray QInstaller::retrieveData(QFileDevice *in, qint64 size)
return ba;
}
+/*!
+ \internal
+*/
void QInstaller::appendData(QFileDevice *out, QFileDevice *in, qint64 size)
{
Q_ASSERT(!in->isSequential());
QInstaller::blockingCopy(in, out, size);
}
+/*!
+ \internal
+*/
void QInstaller::openForRead(QFileDevice *dev)
{
Q_ASSERT(dev);
@@ -108,6 +141,9 @@ void QInstaller::openForRead(QFileDevice *dev)
}
}
+/*!
+ \internal
+*/
void QInstaller::openForWrite(QFileDevice *dev)
{
Q_ASSERT(dev);
@@ -118,6 +154,9 @@ void QInstaller::openForWrite(QFileDevice *dev)
}
}
+/*!
+ \internal
+*/
void QInstaller::openForAppend(QFileDevice *dev)
{
Q_ASSERT(dev);
@@ -128,6 +167,9 @@ void QInstaller::openForAppend(QFileDevice *dev)
}
}
+/*!
+ \internal
+*/
qint64 QInstaller::blockingRead(QFileDevice *in, char *buffer, qint64 size)
{
if (in->atEnd())
@@ -146,6 +188,9 @@ qint64 QInstaller::blockingRead(QFileDevice *in, char *buffer, qint64 size)
return size;
}
+/*!
+ \internal
+*/
qint64 QInstaller::blockingCopy(QFileDevice *in, QFileDevice *out, qint64 size)
{
static const qint64 blockSize = 4096;
@@ -165,11 +210,17 @@ qint64 QInstaller::blockingCopy(QFileDevice *in, QFileDevice *out, qint64 size)
return size;
}
+/*!
+ \internal
+*/
qint64 QInstaller::blockingWrite(QFileDevice *out, const QByteArray &data)
{
return QInstaller::blockingWrite(out, data.constData(), data.size());
}
+/*!
+ \internal
+*/
qint64 QInstaller::blockingWrite(QFileDevice *out, const char *data, qint64 size)
{
qint64 left = size;
diff --git a/src/libs/installer/fileutils.cpp b/src/libs/installer/fileutils.cpp
index 20d1ed93e..147026a16 100644
--- a/src/libs/installer/fileutils.cpp
+++ b/src/libs/installer/fileutils.cpp
@@ -50,6 +50,14 @@
using namespace QInstaller;
+/*!
+ \enum QInstaller::DefaultFilePermissions
+
+ \value NonExecutable
+ Default permissions for a non-executable file.
+ \value Executable
+ Default permissions for an executable file.
+*/
// -- TempDirDeleter
@@ -125,6 +133,10 @@ void TempDirDeleter::releaseAndDelete(const QString &path)
}
}
+/*!
+ Returns the given \a size in a measuring unit suffixed human readable format,
+ with \a precision marking the number of shown decimals.
+*/
QString QInstaller::humanReadableSize(const qint64 &size, int precision)
{
double sizeAsDouble = size;
@@ -154,11 +166,17 @@ QString QInstaller::humanReadableSize(const qint64 &size, int precision)
// -- read, write operations
+/*!
+ \internal
+*/
bool QInstaller::isLocalUrl(const QUrl &url)
{
return url.scheme().isEmpty() || url.scheme().toLower() == QLatin1String("file");
}
+/*!
+ \internal
+*/
QString QInstaller::pathFromUrl(const QUrl &url)
{
if (isLocalUrl(url))
@@ -169,6 +187,9 @@ QString QInstaller::pathFromUrl(const QUrl &url)
return str;
}
+/*!
+ \internal
+*/
void QInstaller::removeFiles(const QString &path, bool ignoreErrors)
{
const QFileInfoList entries = QDir(path).entryInfoList(QDir::AllEntries | QDir::Hidden);
@@ -208,6 +229,16 @@ static QString errnoToQString(int error)
#endif
}
+/*!
+ \internal
+
+ Removes the directory at \a path recursively.
+ @param path The directory to remove
+ @param ignoreErrors if @p true, errors will be silently ignored. Otherwise an exception will be thrown
+ if removing fails.
+
+ @throws QInstaller::Error if the directory cannot be removed and ignoreErrors is @p false
+*/
void QInstaller::removeDirectory(const QString &path, bool ignoreErrors)
{
if (path.isEmpty()) // QDir("") points to the working directory! We never want to remove that one.
@@ -272,6 +303,9 @@ private:
const bool ignore;
};
+/*!
+ \internal
+*/
void QInstaller::removeDirectoryThreaded(const QString &path, bool ignoreErrors)
{
RemoveDirectoryThread thread(path, ignoreErrors);
@@ -283,6 +317,9 @@ void QInstaller::removeDirectoryThreaded(const QString &path, bool ignoreErrors)
throw Error(thread.error());
}
+/*!
+ Removes system generated files from \a path on Windows and macOS. Does nothing on Linux.
+*/
void QInstaller::removeSystemGeneratedFiles(const QString &path)
{
if (path.isEmpty())
@@ -311,6 +348,8 @@ bool QInstaller::setDefaultFilePermissions(const QString &fileName, DefaultFileP
based by the value of \a permissions. This is effective only on Unix platforms
as \c setPermissions() does not manipulate ACLs. On Windows NTFS volumes this
only unsets the legacy read-only flag regardless of the value of \a permissions.
+
+ Returns \c true on success, \c false otherwise.
*/
bool QInstaller::setDefaultFilePermissions(QFile *file, DefaultFilePermissions permissions)
{
@@ -329,6 +368,9 @@ bool QInstaller::setDefaultFilePermissions(QFile *file, DefaultFilePermissions p
return true;
}
+/*!
+ \internal
+*/
void QInstaller::copyDirectoryContents(const QString &sourceDir, const QString &targetDir)
{
Q_ASSERT(QFileInfo(sourceDir).isDir());
@@ -357,6 +399,9 @@ void QInstaller::copyDirectoryContents(const QString &sourceDir, const QString &
}
}
+/*!
+ \internal
+*/
void QInstaller::moveDirectoryContents(const QString &sourceDir, const QString &targetDir)
{
Q_ASSERT(QFileInfo(sourceDir).isDir());
@@ -388,6 +433,9 @@ void QInstaller::moveDirectoryContents(const QString &sourceDir, const QString &
}
}
+/*!
+ \internal
+*/
void QInstaller::mkdir(const QString &path)
{
errno = 0;
@@ -397,6 +445,9 @@ void QInstaller::mkdir(const QString &path)
}
}
+/*!
+ \internal
+*/
void QInstaller::mkpath(const QString &path)
{
errno = 0;
@@ -406,6 +457,12 @@ void QInstaller::mkpath(const QString &path)
}
}
+/*!
+ \internal
+
+ Generates and returns a temporary file name. The name can start with
+ a template \a templ.
+*/
QString QInstaller::generateTemporaryFileName(const QString &templ)
{
if (templ.isEmpty()) {
@@ -440,6 +497,9 @@ QString QInstaller::generateTemporaryFileName(const QString &templ)
#ifdef Q_OS_WIN
#include <qt_windows.h>
+/*!
+ \internal
+*/
QString QInstaller::getShortPathName(const QString &name)
{
if (name.isEmpty())
@@ -456,6 +516,9 @@ QString QInstaller::getShortPathName(const QString &name)
return rc;
}
+/*!
+ \internal
+*/
QString QInstaller::getLongPathName(const QString &name)
{
if (name.isEmpty())
@@ -472,6 +535,11 @@ QString QInstaller::getLongPathName(const QString &name)
return rc;
}
+/*!
+ \internal
+
+ Makes sure that capitalization of directory specified by \a name is canonical.
+*/
QString QInstaller::normalizePathName(const QString &name)
{
QString canonicalName = getShortPathName(name);
@@ -528,6 +596,11 @@ typedef struct {
#pragma pack(pop)
+/*!
+ \internal
+
+ Sets the .ico file at \a icon as application icon for \a application.
+*/
void QInstaller::setApplicationIcon(const QString &application, const QString &icon)
{
QFile iconFile(icon);
@@ -592,6 +665,9 @@ static quint64 symlinkSizeWin(const QString &path)
#endif
+/*!
+ \internal
+*/
quint64 QInstaller::fileSize(const QFileInfo &info)
{
if (!info.isSymLink())
@@ -607,6 +683,12 @@ quint64 QInstaller::fileSize(const QFileInfo &info)
#endif
}
+/*!
+ \internal
+
+ Returns \c true if a file specified by \a path points to a bundle. The
+ absolute path for the bundle can be retrieved with \a bundlePath. Works only on macOS.
+*/
bool QInstaller::isInBundle(const QString &path, QString *bundlePath)
{
#ifdef Q_OS_MACOS
diff --git a/src/libs/installer/fileutils.h b/src/libs/installer/fileutils.h
index 3607a189b..24b033e98 100644
--- a/src/libs/installer/fileutils.h
+++ b/src/libs/installer/fileutils.h
@@ -74,14 +74,6 @@ private:
QString INSTALLER_EXPORT humanReadableSize(const qint64 &size, int precision = 2);
- /*!
- Removes the directory at \a path recursively.
- @param path The directory to remove
- @param ignoreErrors if @p true, errors will be silently ignored. Otherwise an exception will be thrown
- if removing fails.
-
- @throws QInstaller::Error if the directory cannot be removed and ignoreErrors is @p false
- */
void INSTALLER_EXPORT removeFiles(const QString &path, bool ignoreErrors = false);
void INSTALLER_EXPORT removeDirectory(const QString &path, bool ignoreErrors = false);
void INSTALLER_EXPORT removeDirectoryThreaded(const QString &path, bool ignoreErrors = false);
@@ -110,14 +102,8 @@ private:
QString INSTALLER_EXPORT getLongPathName(const QString &name);
QString INSTALLER_EXPORT getShortPathName(const QString &name);
- /*!
- Makes sure that capitalization of directories is canonical.
- */
QString INSTALLER_EXPORT normalizePathName(const QString &name);
- /*!
- Sets the .ico file at \a icon as application icon for \a application.
- */
void INSTALLER_EXPORT setApplicationIcon(const QString &application, const QString &icon);
#endif
}
diff --git a/src/libs/installer/globals.cpp b/src/libs/installer/globals.cpp
index 8634e3611..66de2fec6 100644
--- a/src/libs/installer/globals.cpp
+++ b/src/libs/installer/globals.cpp
@@ -64,6 +64,141 @@ const char IFW_PROGRESS_INDICATOR[] = "ifw.progress.indicator";
namespace QInstaller
{
+/*!
+ \fn QInstaller::lcServer()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageDisplayname()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageDescription()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageVersion()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageInstalledVersion()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageReleasedate()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageInstallDate()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageUpdateDate()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageName()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageDependencies()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageAutodependon()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageVirtual()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageSortingpriority()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageScript()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageDefault()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageEssential()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageForcedinstallation()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageReplaces()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageDownloadableArchives()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageRequiresAdminRights()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageCheckable()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageLicenses()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageUncompressedSize()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcPackageCompressedSize()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcInstallerInstallLog()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcProgressIndicator()
+ \internal
+*/
+
+/*!
+ \fn QInstaller::lcDeveloperBuild()
+ \internal
+*/
+
Q_LOGGING_CATEGORY(lcServer, IFW_SERVER)
Q_LOGGING_CATEGORY(lcPackageDisplayname, IFW_PACKAGE_DISPLAYNAME);
@@ -94,7 +229,9 @@ Q_LOGGING_CATEGORY(lcProgressIndicator, IFW_PROGRESS_INDICATOR)
Q_LOGGING_CATEGORY(lcDeveloperBuild, IFW_DEVELOPER_BUILD)
-
+/*!
+ Returns available logging categories.
+*/
QStringList loggingCategories()
{
static QStringList categories = QStringList()
@@ -128,11 +265,18 @@ QStringList loggingCategories()
}
Q_GLOBAL_STATIC_WITH_ARGS(QRegExp, staticCommaRegExp, (QLatin1String("(, |,)")));
+
+/*!
+ \internal
+*/
QRegExp commaRegExp()
{
return *staticCommaRegExp();
}
+/*!
+ Converts and returns a string \a html containing an HTML document as a plain text.
+*/
QString htmlToString(const QString &html)
{
QTextDocument doc;
@@ -140,6 +284,9 @@ QString htmlToString(const QString &html)
return doc.toPlainText();
}
+/*!
+ \internal
+*/
QString enumToString(const QMetaObject& metaObject, const char *enumerator, int key)
{
QString value = QString();
diff --git a/src/libs/installer/init.cpp b/src/libs/installer/init.cpp
index 3c295d353..ea6f75e1b 100644
--- a/src/libs/installer/init.cpp
+++ b/src/libs/installer/init.cpp
@@ -151,6 +151,10 @@ void messageHandler(QtMsgType type, const QMessageLogContext &context, const QSt
}
}
+/*!
+ Initializes the 7z library and installer resources. Registers
+ custom operations and installs a custom message handler.
+*/
void QInstaller::init()
{
Lib7z::initSevenZ();
diff --git a/src/libs/installer/lib7z_facade.cpp b/src/libs/installer/lib7z_facade.cpp
index c321052e3..3e6b10259 100644
--- a/src/libs/installer/lib7z_facade.cpp
+++ b/src/libs/installer/lib7z_facade.cpp
@@ -832,7 +832,7 @@ STDMETHODIMP ExtractCallback::SetOperationResult(Int32 /*resultEOperationResult*
/*!
\fn virtual Lib7z::ExtractCallback::setCompleted(quint64 completed, quint64 total)
- Returns completed. Always returns true. \a completed and \a total are unused.
+ Always returns \c true. \c completed and \c total are unused.
*/
@@ -951,9 +951,9 @@ static QString createTmp7z()
}
/*!
- Creates an archive using the given file device \a archive. \a sourcePaths can contain one or
- more files, one or more directories or a combination of files and folders. The \c * wildcard
- is supported also. The value of \a level specifies the compression ratio, the default is set
+ Creates an archive using the given file device \a archive. \a sources can contain one or
+ more files, one or more directories or a combination of files and folders. Also, \c * wildcard
+ is supported. The value of \a level specifies the compression ratio, the default is set
to \c 5 (Normal compression). The \a callback can be used to get information about the archive
creation process. If no \a callback is given, an empty implementation is used.
@@ -979,8 +979,8 @@ void INSTALLER_EXPORT createArchive(QFileDevice *archive, const QStringList &sou
}
/*!
- Creates an archive with the given filename \a archive. \a sourcePaths can contain one or more
- files, one or more directories or a combination of files and folders. Also the \c * wildcard
+ Creates an archive with the given filename \a archive. \a sources can contain one or more
+ files, one or more directories or a combination of files and folders. Also, \c * wildcard
is supported. To be able to use the function during an elevated installation, set \a mode to
\c TmpFile::Yes. The value of \a level specifies the compression ratio, the default is set
to \c 5 (Normal compression). The \a callback can be used to get information about the archive
diff --git a/src/libs/installer/metadatajob.cpp b/src/libs/installer/metadatajob.cpp
index 55379c358..6fd1a48d6 100644
--- a/src/libs/installer/metadatajob.cpp
+++ b/src/libs/installer/metadatajob.cpp
@@ -44,6 +44,14 @@ const QStringList metaElements = {QLatin1String("Script"), QLatin1String("Licens
namespace QInstaller {
+/*!
+ \enum QInstaller::DownloadType
+
+ \value All
+ \value CompressedPackage
+ \value UpdatesXML
+*/
+
static QUrl resolveUrl(const FileTaskResult &result, const QString &url)
{
QUrl u(url);
diff --git a/src/libs/installer/packagesource.cpp b/src/libs/installer/packagesource.cpp
index f09cd4106..46033f31b 100644
--- a/src/libs/installer/packagesource.cpp
+++ b/src/libs/installer/packagesource.cpp
@@ -54,16 +54,16 @@ namespace QInstaller {
*/
/*!
- \fn PackageSource::PackageSource()
+ \fn QInstaller::PackageSource::PackageSource()
Constructs an empty package source info object. The object's priority is set to -1. The url is
initialized using a \l{default-constructed value}.
*/
/*!
- \fn PackageSource::PackageSource(const QUrl &u, int p)
+ \fn QInstaller::PackageSource::PackageSource(const QUrl &u, int p)
- Constructs an package source info object. The object's url is set to \a u, while the priority
+ Constructs a package source info object. The object's url is set to \a u, while the priority
is set to \a p.
*/
diff --git a/src/libs/installer/progresscoordinator.cpp b/src/libs/installer/progresscoordinator.cpp
index e7c23eef0..91fa9671e 100644
--- a/src/libs/installer/progresscoordinator.cpp
+++ b/src/libs/installer/progresscoordinator.cpp
@@ -100,7 +100,7 @@ void ProgressCoordinator::registerPartProgress(QObject *sender, const char *sign
/*!
- This slot gets the progress changed signals from different tasks. The values 0 and 1 are handled as
+ This slot gets the progress changed signals from different tasks. The \a fraction values 0 and 1 are handled as
special values.
0 - is just ignored, so you can use a timer which gives the progress, e.g. like a downloader does.
diff --git a/src/libs/installer/protocol.cpp b/src/libs/installer/protocol.cpp
index d68af1722..3bafc481e 100644
--- a/src/libs/installer/protocol.cpp
+++ b/src/libs/installer/protocol.cpp
@@ -34,6 +34,26 @@ namespace QInstaller {
typedef qint32 PackageSize;
/*!
+ \inmodule QtInstallerFramework
+ \namespace Protocol
+ \brief Contains values related to the internal client-server connection protocol.
+*/
+
+/*!
+ \enum Protocol::Mode
+
+ \value Debug
+ \value Production
+*/
+
+/*!
+ \enum Protocol::StartAs
+
+ \value User
+ \value SuperUser
+*/
+
+/*!
Write a packet containing \a command and \a data to \a device.
\note Both client and server need to have the same endianness.
diff --git a/src/libs/installer/proxycredentialsdialog.cpp b/src/libs/installer/proxycredentialsdialog.cpp
index 471e6fe5b..5ce941718 100644
--- a/src/libs/installer/proxycredentialsdialog.cpp
+++ b/src/libs/installer/proxycredentialsdialog.cpp
@@ -32,6 +32,12 @@
namespace QInstaller {
+/*!
+ \inmodule QtInstallerFramework
+ \namespace Ui
+ \brief Groups user interface forms generated with Qt Designer.
+*/
+
ProxyCredentialsDialog::ProxyCredentialsDialog(const QNetworkProxy &proxy, QWidget *parent) :
QDialog(parent),
ui(new Ui::ProxyCredentialsDialog)
diff --git a/src/libs/installer/qinstallerglobal.cpp b/src/libs/installer/qinstallerglobal.cpp
new file mode 100644
index 000000000..177a2595d
--- /dev/null
+++ b/src/libs/installer/qinstallerglobal.cpp
@@ -0,0 +1,72 @@
+/**************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Installer Framework.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** 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 General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+**************************************************************************/
+
+#include "qinstallerglobal.h"
+
+/*!
+ \enum QInstaller::JobError
+
+ \value InvalidUrl
+ \value Timeout
+ \value DownloadError
+ \value InvalidUpdatesXml
+ \value InvalidMetaInfo
+ \value ExtractionError
+ \value UserIgnoreError
+ \value RepositoryUpdatesReceived
+*/
+
+/*!
+ \typedef QInstaller::Operation
+
+ Synonym for KDUpdater::UpdateOperation.
+*/
+
+/*!
+ \typedef QInstaller::OperationList
+
+ Synonym for QList<QInstaller::Operation*>.
+*/
+
+/*!
+ \typedef QInstaller::Package
+
+ Synonym for KDUpdater::Update.
+*/
+
+/*!
+ \typedef QInstaller::PackagesList
+
+ Synonym for QList<QInstaller::Package*>.
+*/
+
+/*!
+ \typedef QInstaller::LocalPackagesHash
+
+ Synonym for QHash<QString, KDUpdater::LocalPackage>.
+*/
diff --git a/src/libs/installer/repository.cpp b/src/libs/installer/repository.cpp
index 47e985eb2..3957ce5aa 100644
--- a/src/libs/installer/repository.cpp
+++ b/src/libs/installer/repository.cpp
@@ -64,7 +64,7 @@ Repository::Repository(const Repository &other)
/*!
Constructs a new repository by setting its address to \a url
- and its default and \a compressed states.
+ and \a isDefault and \a compressed states.
*/
Repository::Repository(const QUrl &url, bool isDefault, bool compressed)
: m_url(url)
@@ -144,7 +144,8 @@ bool Repository::isEnabled() const
}
/*!
- Sets this repository to \n enabled state and thus to use this repository for information retrieval or not.
+ Sets this repository to \a enabled state. If \a enabled is \c true,
+ the repository is used for information retrieval.
*/
void Repository::setEnabled(bool enabled)
{
@@ -276,6 +277,9 @@ void Repository::registerMetaType()
qRegisterMetaTypeStreamOperators<Repository>("Repository");
}
+/*!
+ \internal
+*/
QDataStream &operator>>(QDataStream &istream, Repository &repository)
{
QByteArray url, username, password, displayname, compressed;
@@ -288,6 +292,9 @@ QDataStream &operator>>(QDataStream &istream, Repository &repository)
return istream;
}
+/*!
+ \internal
+*/
QDataStream &operator<<(QDataStream &ostream, const Repository &repository)
{
return ostream << repository.m_url.toEncoded().toBase64() << repository.m_default << repository.m_enabled
diff --git a/src/libs/installer/repositorycategory.cpp b/src/libs/installer/repositorycategory.cpp
index 79b1cc6a8..4e8d45abd 100644
--- a/src/libs/installer/repositorycategory.cpp
+++ b/src/libs/installer/repositorycategory.cpp
@@ -168,11 +168,17 @@ bool RepositoryCategory::operator!=(const RepositoryCategory &other) const
return !(*this == other);
}
+/*!
+ \internal
+*/
QDataStream &operator>>(QDataStream &istream, RepositoryCategory &repository)
{
return istream;
}
+/*!
+ \internal
+*/
QDataStream &operator<<(QDataStream &ostream, const RepositoryCategory &repository)
{
return ostream << repository.m_displayname.toUtf8().toBase64() << repository.m_data;
diff --git a/src/libs/installer/settings.cpp b/src/libs/installer/settings.cpp
index 66fad88e5..b0d631f60 100644
--- a/src/libs/installer/settings.cpp
+++ b/src/libs/installer/settings.cpp
@@ -43,6 +43,13 @@
using namespace QInstaller;
+/*!
+ \typedef QInstaller::RepoHash
+
+ Synonym for QHash<QString, QPair<Repository, Repository> >. Describes a repository
+ update with the supported key strings being \e{replace}, \e{remove}, and \e{add}.
+*/
+
static const QLatin1String scInstallerApplicationIcon("InstallerApplicationIcon");
static const QLatin1String scInstallerWindowIcon("InstallerWindowIcon");
static const QLatin1String scLogo("Logo");
diff --git a/src/libs/installer/utils.cpp b/src/libs/installer/utils.cpp
index 7961147b0..fb477f24e 100644
--- a/src/libs/installer/utils.cpp
+++ b/src/libs/installer/utils.cpp
@@ -51,6 +51,9 @@
#include <time.h>
#endif
+/*!
+ \internal
+*/
void QInstaller::uiDetachedWait(int ms)
{
QTime timer;
@@ -110,7 +113,11 @@ bool QInstaller::startDetached(const QString &program, const QStringList &argume
return success;
}
-// Returns ["en-us", "en"] for "en-us"
+/*!
+ \internal
+
+ Returns ["en-us", "en"] for "en-us".
+*/
QStringList QInstaller::localeCandidates(const QString &locale_)
{
QStringList candidates;
@@ -129,6 +136,10 @@ QStringList QInstaller::localeCandidates(const QString &locale_)
static uint verbLevel = 0;
+/*!
+ Sets to verbose output if \a v is set to \c true. Calling this multiple
+ times increases or decreases the verbosity level accordingly.
+*/
void QInstaller::setVerbose(bool v)
{
if (v)
@@ -137,21 +148,33 @@ void QInstaller::setVerbose(bool v)
verbLevel--;
}
+/*!
+ Returns \c true if the installer is set to verbose output.
+*/
bool QInstaller::isVerbose()
{
return verbLevel > 0 ? true : false;
}
+/*!
+ Returns the current verbosity level.
+*/
uint QInstaller::verboseLevel()
{
return verbLevel;
}
+/*!
+ \internal
+*/
std::ostream &QInstaller::operator<<(std::ostream &os, const QString &string)
{
return os << qPrintable(string);
}
+/*!
+ \internal
+*/
QByteArray QInstaller::calculateHash(QIODevice *device, QCryptographicHash::Algorithm algo)
{
Q_ASSERT(device);
@@ -166,6 +189,9 @@ QByteArray QInstaller::calculateHash(QIODevice *device, QCryptographicHash::Algo
return QByteArray(); // never reached
}
+/*!
+ \internal
+*/
QByteArray QInstaller::calculateHash(const QString &path, QCryptographicHash::Algorithm algo)
{
QFile file(path);
@@ -174,6 +200,9 @@ QByteArray QInstaller::calculateHash(const QString &path, QCryptographicHash::Al
return calculateHash(&file, algo);
}
+/*!
+ \internal
+*/
QString QInstaller::replaceVariables(const QHash<QString, QString> &vars, const QString &str)
{
QString res;
@@ -194,6 +223,9 @@ QString QInstaller::replaceVariables(const QHash<QString, QString> &vars, const
return res;
}
+/*!
+ \internal
+*/
QString QInstaller::replaceWindowsEnvironmentVariables(const QString &str)
{
const QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
@@ -357,6 +389,9 @@ static QVector<Char*> qWinCmdLine(Char *cmdParam, int length, int &argc)
return argv;
}
+/*!
+ \internal
+*/
QStringList QInstaller::parseCommandLineArgs(int argc, char **argv)
{
Q_UNUSED(argc)
@@ -421,12 +456,19 @@ static QString qt_create_commandline(const QString &program, const QStringList &
return args;
}
+/*!
+ \internal
+*/
QString QInstaller::createCommandline(const QString &program, const QStringList &arguments)
{
return qt_create_commandline(program, arguments);
}
-//copied from qsystemerror.cpp in Qt
+/*!
+ \internal
+
+ Copied from qsystemerror.cpp in Qt.
+*/
QString QInstaller::windowsErrorString(int errorCode)
{
QString ret;
diff --git a/src/libs/kdtools/sysinfo_x11.cpp b/src/libs/kdtools/sysinfo_x11.cpp
index 3099a369a..bc55939a6 100644
--- a/src/libs/kdtools/sysinfo_x11.cpp
+++ b/src/libs/kdtools/sysinfo_x11.cpp
@@ -44,6 +44,9 @@
namespace KDUpdater {
+/*!
+ Returns the amount of memory installed on a system.
+*/
quint64 installedMemory()
{
#ifdef Q_OS_LINUX
@@ -74,6 +77,9 @@ quint64 installedMemory()
return 0;
}
+/*!
+ Returns currently mounted volumes as list of the \c VolumeInfo objects.
+*/
QList<VolumeInfo> mountedVolumes()
{
QList<VolumeInfo> result;
@@ -110,6 +116,9 @@ QList<VolumeInfo> mountedVolumes()
return result;
}
+/*!
+ Returns a list of currently running processes.
+*/
QList<ProcessInfo> runningProcesses()
{
QList<ProcessInfo> processes;
@@ -131,6 +140,9 @@ QList<ProcessInfo> runningProcesses()
return processes;
}
+/*!
+ \internal
+*/
bool pathIsOnLocalDevice(const QString &path)
{
Q_UNUSED(path);
@@ -138,6 +150,9 @@ bool pathIsOnLocalDevice(const QString &path)
return true;
}
+/*!
+ \internal
+*/
bool killProcess(const ProcessInfo &process, int msecs)
{
Q_UNUSED(process);
diff --git a/src/libs/kdtools/updatefinder.cpp b/src/libs/kdtools/updatefinder.cpp
index 3adafe88e..c64d9b487 100644
--- a/src/libs/kdtools/updatefinder.cpp
+++ b/src/libs/kdtools/updatefinder.cpp
@@ -482,7 +482,7 @@ void UpdateFinder::setLocalPackageHub(std::weak_ptr<LocalPackageHub> hub)
}
/*!
- Sets the package sources information to use when searching for applicable packages.
+ Sets the package \a sources information when searching for applicable packages.
*/
void UpdateFinder::setPackageSources(const QSet<PackageSource> &sources)
{
diff --git a/src/libs/kdtools/updateoperation.cpp b/src/libs/kdtools/updateoperation.cpp
index 0a61c0105..73e904da5 100644
--- a/src/libs/kdtools/updateoperation.cpp
+++ b/src/libs/kdtools/updateoperation.cpp
@@ -182,6 +182,11 @@ QStringList UpdateOperation::arguments() const
return m_arguments;
}
+/*!
+ Returns \c true if the argument count is within limits of \a minArgCount
+ and \a maxArgCount. \a argDescription contains information about the
+ expected form.
+*/
bool UpdateOperation::checkArgumentCount(int minArgCount, int maxArgCount,
const QString &argDescription)
{
@@ -213,6 +218,9 @@ bool UpdateOperation::checkArgumentCount(int minArgCount, int maxArgCount,
return true;
}
+/*!
+ Returns \c true if the argument count is exactly \a argCount.
+*/
bool UpdateOperation::checkArgumentCount(int argCount)
{
return checkArgumentCount(argCount, argCount);
diff --git a/src/libs/kdtools/updater.cpp b/src/libs/kdtools/updater.cpp
new file mode 100644
index 000000000..a3ac7c768
--- /dev/null
+++ b/src/libs/kdtools/updater.cpp
@@ -0,0 +1,40 @@
+/**************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Installer Framework.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** 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 General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+**************************************************************************/
+
+#include "updater.h"
+
+/*!
+ \enum KDUpdater::Error
+
+ \value ENoError
+ \value ECannotStartTask
+ \value ECannotPauseTask
+ \value ECannotResumeTask
+ \value ECannotStopTask
+ \value EUnknown
+*/