QInstaller Namespace

Contains classes to implement the core functionality of the Qt Installer Framework and the installer UI. More...

Header: #include <QInstaller>

Namespaces

namespace Protocol
namespace TaskRole
namespace Ui

Classes

Types

typedef Backup
typedef BackupFiles
enum DefaultFilePermissions { NonExecutable, Executable }
enum DownloadType { All, CompressedPackage, UpdatesXML }
enum JobError { InvalidUrl, Timeout, DownloadError, InvalidUpdatesXml, InvalidMetaInfo, …, RepositoryUpdatesReceived }
typedef LocalPackagesHash
typedef Operation
typedef OperationList
typedef Package
typedef PackagesList
typedef RepoHash

Functions

QStringList checkMutualOptions(CommandLineParser &parser, const QStringList &options)
QString htmlToString(const QString &html)
QString humanReadableSize(const qint64 &size, int precision = 2)
void init()
QStringList loggingCategories()
uint qHash(const QInstaller::PackageSource &key, uint seed)
uint qHash(const QInstaller::Repository &repository)
uint qHash(const QInstaller::RepositoryCategory &repository)
bool receivePacket(QIODevice *device, QByteArray *command, QByteArray *data)
void removeSystemGeneratedFiles(const QString &path)
void replaceHighDpiImage(QString &imagePath)
QString replacePath(const QString &path, const QString &before, const QString &after)
void sendPacket(QIODevice *device, const QByteArray &command, const QByteArray &data)
bool setDefaultFilePermissions(const QString &fileName, QInstaller::DefaultFilePermissions permissions)
bool setDefaultFilePermissions(QFile *file, QInstaller::DefaultFilePermissions permissions)
bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid = 0)
void trimmedCopyConfigData(const QString &source, const QString &target, const QStringList &elementsToRemoveTags)
QDebug operator<<(QDebug dbg, QInstaller::Component *component)
QDataStream &operator<<(QDataStream &ostream, const QInstaller::ArchiveEntry &entry)
bool operator==(const QInstaller::PackageSource &lhs, const QInstaller::PackageSource &rhs)
bool operator==(const QInstaller::ArchiveEntry &lhs, const QInstaller::ArchiveEntry &rhs)
QDataStream &operator>>(QDataStream &istream, QInstaller::ArchiveEntry &entry)

Detailed Description

Namespaces

namespace QInstaller::Protocol

namespace QInstaller::TaskRole

namespace QInstaller::Ui

Classes

class AbstractArchive

The AbstractArchive class is the base class for classes representing different archive files. It cannot be instantiated on its own but defines the API and provides common functionality when subclassed. More...

class AbstractFileTask

The AbstractFileTask class is the base class of file related tasks. More...

class ArchiveEntry

The ArchiveEntry struct represents an entry in an archive file, which can be for example a file or a directory. More...

class ArchiveFactory

The ArchiveFactory class is used to create archive objects based on the suffix of a given filename. More...

class AspectRatioLabel

The AspectRatioLabel class provides a label for displaying a pixmap that maintains its original aspect ratio when resized. More...

class BinaryContent

The BinaryContent class handles binary information embedded into executables. More...

class BinaryFormatEngine

The BinaryFormatEngine class is the default file engine for accessing resource collections and resource files. More...

class BinaryFormatEngineHandler

The BinaryFormatEngineHandler class provides a way to register resource collections and resource files. More...

class BinaryLayout

The BinaryLayout class describes the binary content appended to a file. More...

class Component

The Component class represents the current component. More...

class ComponentModel

The ComponentModel class holds a data model for visual representation of available components to install. More...

class ComponentSelectionPage

The ComponentSelectionPage class changes the checked state of components. More...

class DirectoryGuard

RAII class to create a directory and delete it on destruction unless released. More...

class FileTaskItem

The FileTaskItem class represents an item in a file task object. More...

class FileTaskResult

The FileTaskResult class represents the results of a file task. More...

class FinishedPage

The FinishedPage class completes the installation wizard. More...

class IntroductionPage

The IntroductionPage class displays information about the product to install. More...

class Lib7zArchive

The Lib7zArchive class represents an archive file handled with the LZMA software development kit. More...

class LibArchiveArchive

The LibArchiveArchive class represents an archive file handled with libarchive archive and compression library. More...

class LibArchiveWrapper

The LibArchiveWrapper class provides an interface for interacting with archives handled using the libarchive archive and compression library. More...

class LicenseAgreementPage

The LicenseAgreementPage presents a license agreement to the end users for acceptance. More...

class LoggingHandler

The LoggingHandler class provides methods for manipulating the application-wide verbosiveness and format of printed debug messages. More...

class MessageBoxHandler

The MessageBoxHandler class provides a modal dialog for informing the user or asking the user a question and receiving an answer. More...

class OperationBlob

The OperationBlob class is a textual representation of an operation that can be instantiated and executed by the Qt Installer Framework. More...

class PackageManagerCore

The PackageManagerCore class provides the core functionality of the Qt Installer Framework. More...

class PackageManagerGui

The PackageManagerGui class provides the core functionality for non-interactive installations. More...

class PackageManagerPage

The PackageManagerPage class displays information about the product to install. More...

class PackageSource

The PackageSource class specifies a single package source. More...

class PerformInstallationForm

The PerformInstallationForm class shows progress information about the installation state. More...

class PerformInstallationPage

The PerformInstallationPage class shows progress information about the installation state. More...

class ReadyForInstallationPage

The ReadyForInstallationPage class informs end users that the installation can begin. More...

class Resource

The Resource class is an interface for wrapping a file as read only device. More...

class ResourceCollection

The ResourceCollection class is an abstraction that groups together a number of resources. More...

class ResourceCollectionManager

The ResourceCollectionManager class is an abstraction that groups together a number of resource collections. More...

class RestartPage

The RestartPage class enables restarting the installer. More...

class ScriptEngine

The ScriptEngine class is used to prepare and run the component scripts. More...

class StartMenuDirectoryPage

The StartMenuDirectoryPage class specifies the program group for the product in the Windows Start menu. More...

class SystemInfo

Provides information about the operating system. More...

class TargetDirectoryPage

The TargetDirectoryPage class specifies the target directory for the installation. More...

Type Documentation

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

enum QInstaller::DefaultFilePermissions

ConstantValueDescription
QInstaller::NonExecutable0x6644Default permissions for a non-executable file.
QInstaller::Executable0x7755Default permissions for an executable file.

enum QInstaller::DownloadType

ConstantValue
QInstaller::All0
QInstaller::CompressedPackage1
QInstaller::UpdatesXML2

enum QInstaller::JobError

ConstantValue
QInstaller::InvalidUrl0x24B04
QInstaller::Timeout0x24b05
QInstaller::DownloadError0x24b06
QInstaller::InvalidUpdatesXml0x24b07
QInstaller::InvalidMetaInfo0x24b08
QInstaller::ExtractionError0x24b09
QInstaller::UserIgnoreError0x24b0a
QInstaller::RepositoryUpdatesReceived0x24b0b

typedef QInstaller::LocalPackagesHash

Synonym for QHash<QString, KDUpdater::LocalPackage>.

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::RepoHash

Synonym for QHash<QString, QPair<Repository, Repository> >. Describes a repository update with the supported key strings being replace, remove, and add.

Function Documentation

QStringList QInstaller::checkMutualOptions(CommandLineParser &parser, const QStringList &options)

Returns a list of mutually exclusive options passed to the parser, if there is at least one mutually exclusive pair of options set. Otherwise returns an empty QStringList. The options considered mutual are provided with options.

QString QInstaller::htmlToString(const QString &html)

Converts and returns a string html containing an HTML document as a plain text.

QString QInstaller::humanReadableSize(const qint64 &size, int precision = 2)

Returns the given size in a measuring unit suffixed human readable format, with precision marking the number of shown decimals.

void QInstaller::init()

Initializes the 7z library and installer resources. Registers custom operations and installs a custom message handler.

QStringList QInstaller::loggingCategories()

Returns available logging categories.

uint QInstaller::qHash(const QInstaller::PackageSource &key, uint seed)

Returns the hash value for the key, using seed to seed the calculation.

uint QInstaller::qHash(const QInstaller::Repository &repository)

Returns a hash of the repository.

uint QInstaller::qHash(const QInstaller::RepositoryCategory &repository)

Returns a hash of the repository category repository.

bool QInstaller::receivePacket(QIODevice *device, QByteArray *command, QByteArray *data)

Reads a packet from device, and stores its content into command and data.

Returns false if the packet in the device buffer is yet incomplete, true otherwise.

Note: Both client and server need to have the same endianness.

void QInstaller::removeSystemGeneratedFiles(const QString &path)

Removes system generated files from path on Windows and macOS. Does nothing on Linux.

void QInstaller::replaceHighDpiImage(QString &imagePath)

Replaces imagePath with high dpi image. If high dpi image is not provided or high dpi screen is not in use, the original value is returned.

QString QInstaller::replacePath(const QString &path, const QString &before, const QString &after)

Replaces the path before with the path after at the beginning of path and returns the replaced path. If before cannot be found in path, the original value is returned.

void QInstaller::sendPacket(QIODevice *device, const QByteArray &command, const QByteArray &data)

Write a packet containing command and data to device.

Note: Both client and server need to have the same endianness.

bool QInstaller::setDefaultFilePermissions(const QString &fileName, QInstaller::DefaultFilePermissions permissions)

Sets permissions of file or directory specified by fileName to 644 or 755 based by the value of permissions.

Returns true on success, false otherwise.

bool QInstaller::setDefaultFilePermissions(QFile *file, QInstaller::DefaultFilePermissions permissions)

Sets permissions of file or directory specified by file to 644 or 755 based by the value of permissions. This is effective only on Unix platforms as setPermissions() does not manipulate ACLs. On Windows NTFS volumes this only unsets the legacy read-only flag regardless of the value of permissions.

Returns true on success, false otherwise.

bool QInstaller::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid = 0)

Starts the program program with the arguments arguments in a new process, and detaches from it. Returns true on success; otherwise returns false. If the calling process exits, the detached process will continue to live.

Note that arguments that contain spaces are not passed to the process as separate arguments.

Unix: The started process will run in its own session and act like a daemon. Windows: Arguments that contain spaces are wrapped in quotes. The started process will run as a regular standalone process.

The process will be started in the directory workingDirectory.

If the function is successful then pid is set to the process identifier of the started process.

Additional note: The difference in using this function over its equivalent from QProcess appears on Windows. While this function will truly detach and not show a GUI window for the started process, the QProcess version will.

void QInstaller::trimmedCopyConfigData(const QString &source, const QString &target, const QStringList &elementsToRemoveTags)

Copies an internal configuration file from source to target. The XML elements, and their children, specified by elementsToRemoveTags will be removed from the target file. All relative filenames referenced in the source configuration file will be also copied to the location of the target file.

Throws QInstaller::Error in case of failure.

QDebug QInstaller::operator<<(QDebug dbg, QInstaller::Component *component)

Returns the debugging output stream, dbg, for the component component.

QDataStream &QInstaller::operator<<(QDataStream &ostream, const QInstaller::ArchiveEntry &entry)

Writes an entry to the specified ostream. Returns a reference to ostream.

bool QInstaller::operator==(const QInstaller::PackageSource &lhs, const QInstaller::PackageSource &rhs)

Returns true if lhs and rhs are equal; otherwise returns false.

bool QInstaller::operator==(const QInstaller::ArchiveEntry &lhs, const QInstaller::ArchiveEntry &rhs)

Returns true if left-hand-side entry lhs is equal to right-hand-size entry rhs.

QDataStream &QInstaller::operator>>(QDataStream &istream, QInstaller::ArchiveEntry &entry)

Reads an entry from the specified istream. Returns a reference to istream.

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