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>

Classes

Types

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

Functions

Q_DECL_IMPORT compareVersion(const int &v1, const int &v2)
int installedMemory()
int mountedVolumes()
int runningProcesses()

Detailed Description

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

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

Classes

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 LockFile

class ParseXmlFilesTask

class ProcessInfo

class ResourceFileDownloader

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

class Update

Type Documentation

enum KDUpdater::Error

ConstantValue
KDUpdater::ENoError0
KDUpdater::ECannotStartTask1
KDUpdater::ECannotPauseTask2
KDUpdater::ECannotResumeTask3
KDUpdater::ECannotStopTask4
KDUpdater::EUnknown5

Function Documentation

Q_DECL_IMPORT KDUpdater::compareVersion(const int &v1, const int &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.

Example:

 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("2.0.12.4", "2.1.10.4"); // 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

int KDUpdater::installedMemory()

Returns the amount of memory installed on a system.

int KDUpdater::mountedVolumes()

Returns currently mounted volumes as list of the VolumeInfo objects.

int KDUpdater::runningProcesses()

Returns a list of currently running processes.