Application Class

(KDUpdater::Application)

The Application class represents an application that can be updated. More...

Header: #include <Application>
Inherits: QObject

Public Functions

Application(ConfigurationInterface *config = 0, QObject *p = 0)
~Application()
void addFilesForDelayedDeletion(const QStringList &files)
void addUpdateSource(const QString &name, const QString &title, const QString &description, const QUrl &url, int priority = -1)
QString applicationDirectory() const
QString applicationName() const
QString applicationVersion() const
QStringList filesForDelayedDeletion() const
PackagesInfo *packagesInfo() const
QString packagesXMLFileName() const
void setApplicationDirectory(const QString &dir)
void setPackagesXMLFileName(const QString &fileName)
void setUpdateSourcesXMLFileName(const QString &fileName)
UpdateSourcesInfo *updateSourcesInfo() const
QString updateSourcesXMLFileName() const
  • 31 public functions inherited from QObject

Public Slots

void printError(int errorCode, const QString &error)
  • 1 public slot inherited from QObject

Static Public Members

Application *instance()
  • 10 static public members inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 2 signals inherited from QObject
  • 1 public variable inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The Application class represents an application that can be updated.

A KDUpdater application is an application that interacts with one or more update servers and downloads or installs updates. This class helps in describing an application in terms of:

User can also retrieve some information from this class:

  • Application name
  • Application version

Member Function Documentation

Application::Application(ConfigurationInterface *config = 0, QObject *p = 0)

Constructs an application with the parent p and configuration class config.

Application::~Application()

Destroys the application.

void Application::addFilesForDelayedDeletion(const QStringList &files)

Schedules files for delayed deletion.

void Application::addUpdateSource(const QString &name, const QString &title, const QString &description, const QUrl &url, int priority = -1)

Adds the name, title, description, url, and priority of the update source to this class.

See also KDUpdater::UpdateSourceInfo and KDUpdater::UpdateSourcesInfo.

QString Application::applicationDirectory() const

Returns the path to the application directory.

See also setApplicationDirectory().

QString Application::applicationName() const

Returns the application name. By default, QCoreApplication::applicationName() is returned.

QString Application::applicationVersion() const

Returns the application version.

QStringList Application::filesForDelayedDeletion() const

Returns a list of files that are scheduled for delayed deletion.

[static] Application *Application::instance()

Returns a previously created application instance.

PackagesInfo *Application::packagesInfo() const

Returns the KDUpdater::PackagesInfo object associated with this application.

QString Application::packagesXMLFileName() const

Returns the installation information XML file name.

See also setPackagesXMLFileName().

[slot] void Application::printError(int errorCode, const QString &error)

Prints the error code errorCode and error message specified by error.

void Application::setApplicationDirectory(const QString &dir)

Sets the application directory path directory to dir. The installation information and update sources XML files found in the new application directory will be used.

See also applicationDirectory().

void Application::setPackagesXMLFileName(const QString &fileName)

Sets the file name of the installation information XML file for this application to fileName. By default, this is assumed to be Packages.xml in the application directory.

See also packagesXMLFileName() and KDUpdater::PackagesInfo::setFileName().

void Application::setUpdateSourcesXMLFileName(const QString &fileName)

Sets 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.

See also updateSourcesXMLFileName() and KDUpdater::UpdateSourcesInfo::setFileName().

UpdateSourcesInfo *Application::updateSourcesInfo() const

Returns the KDUpdater::UpdateSourcesInfo object associated with this application.

QString Application::updateSourcesXMLFileName() const

Returns the update sources XML file name.

See also setUpdateSourcesXMLFileName().

© 2016 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.