KDUpdater Namespace

The KDUpdater classes provide functions to automatically detect updates to applications, to retrieve them from external repositories, and to install them. More...

Header: #include <KDUpdater>



enum Error { ENoError, ECannotStartTask, ECannotPauseTask, ECannotResumeTask, ECannotStopTask, EUnknown }


int compareVersion(const QString &v1, const QString &v2)
quint64 installedMemory()
QList<KDUpdater::VolumeInfo> mountedVolumes()
QList<KDUpdater::ProcessInfo> runningProcesses()

Detailed Description

KDUpdater classes are a fork of KDAB's general KDUpdater module.


class FileDownloader

The FileDownloader class is the base class for file downloaders used in KDUpdater. More...

class FileDownloaderFactory

The FileDownloaderFactory class acts as a factory for KDUpdater::FileDownloader. More...

class FileDownloaderProxyFactory

The FileDownloaderProxyFactory class provides fine-grained proxy selection. More...

class HttpDownloader

The HttpDownloader class is used to download files over FTP, HTTP, or HTTPS. More...

class LocalFileDownloader

The LocalFileDownloader class is used to copy files from the local file system. More...

class LocalPackage

The LocalPackage class describes a single installed package in the application. More...

class LocalPackageHub

The LocalPackageHub class provides access to information about packages installed on the application side. More...

class ResourceFileDownloader

The ResourceFileDownloader class can be used to download resource files. More...

class Task

The Task class is the base class for all tasks in KDUpdater. More...

class Update

Represents a single update. More...

class UpdateFinder

The UpdaterFinder class finds updates applicable for installed packages. More...

class UpdateOperation

The UpdateOperation class is an abstract base class for update operations. More...

class UpdateOperationFactory

The UpdateOperationFactory class is used to create update operations based on their name. More...

Type Documentation

enum KDUpdater::Error


Function Documentation

int KDUpdater::compareVersion(const QString &v1, const QString &v2)

This function compares two version strings v1 and v2 and returns -1, 0 or +1 based on the following rule

  • Returns 0 if v1 == v2
  • Returns -1 if v1 < v2
  • Returns +1 if v1 > v2

The function is very similar to strcmp(), except that it works on version strings.


KDUpdater::compareVersion("2.0", "2.1"); // Returns -1
KDUpdater::compareVersion("2.1", "2.0"); // Returns +1
KDUpdater::compareVersion("2.0", "2.0"); // Returns 0
KDUpdater::compareVersion("2.1", "2.1"); // Returns 0

KDUpdater::compareVersion("2.0", "2.x"); // Returns 0
KDUpdater::compareVersion("2.x", "2.0"); // Returns 0

KDUpdater::compareVersion("", ""); // Returns -1
KDUpdater::compareVersion("2.0.12.x", "2.0.x");    // Returns 0
KDUpdater::compareVersion("2.1.12.x", "2.0.x");    // Returns +1
KDUpdater::compareVersion("2.1.12.x", "2.x");      // Returns 0
KDUpdater::compareVersion("2.x", "2.1.12.x");      // Returns 0

quint64 KDUpdater::installedMemory()

Returns the amount of memory installed on a system.

QList<KDUpdater::VolumeInfo> KDUpdater::mountedVolumes()

Returns currently mounted volumes as list of the VolumeInfo objects.

QList<KDUpdater::ProcessInfo> KDUpdater::runningProcesses()

Returns a list of currently running processes.

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.