TargetDirectoryPage Class

class QInstaller::TargetDirectoryPage

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

Header: #include <TargetDirectoryPage>
Inherits: QInstaller::PackageManagerPage

Public Functions

TargetDirectoryPage(QInstaller::PackageManagerCore *core)
void setTargetDir(const QString &dirName)
QString targetDir() const

Reimplemented Public Functions

virtual void initializePage() override
virtual bool isComplete() const override
virtual bool validatePage() override

Reimplemented Protected Functions

virtual void entering() override
virtual void leaving() override

Detailed Description

End users can leave the page to continue the installation only if certain criteria are fulfilled. Some of them are checked in the validatePage() function, some in the targetDirWarning() function:

  • No empty path given as target.
  • No relative path given as target.
  • Only ASCII characters are allowed in the path if the <AllowNonAsciiCharacters> element in the configuration file is set to false.
  • The following ambiguous characters are not allowed in the path: ["~<>|?*!@#$%^&:,;]
  • No root or home directory given as target.
  • On Windows, path names must be less than 260 characters long.
  • No spaces in the path if the <AllowSpaceInPath> element in the configuration file is set to false.

Member Function Documentation

TargetDirectoryPage::TargetDirectoryPage(QInstaller::PackageManagerCore *core)

Constructs a target directory selection page with core as parent.

[override virtual protected] void TargetDirectoryPage::entering()

Reimplements: PackageManagerPage::entering().

Initializes the page's fields based on values from fields on previous pages.

[override virtual] void TargetDirectoryPage::initializePage()

Reimplements: QWizardPage::initializePage().

Initializes the page.

[override virtual] bool TargetDirectoryPage::isComplete() const

Reimplements: PackageManagerPage::isComplete() const.

Requests a warning message to be shown to end users upon invalid input. If the input is valid, the Next button is enabled.

Returns true if a valid path to the target directory is set; otherwise returns false.

[override virtual protected] void TargetDirectoryPage::leaving()

Reimplements: PackageManagerPage::leaving().

Called when end users leave the page and the PackageManagerGui:currentPageChanged() signal is triggered.

void TargetDirectoryPage::setTargetDir(const QString &dirName)

Sets the directory specified by dirName as the target directory for the installation.

See also targetDir().

QString TargetDirectoryPage::targetDir() const

Returns the target directory for the installation.

See also setTargetDir().

[override virtual] bool TargetDirectoryPage::validatePage()

Reimplements: PackageManagerPage::validatePage().

Returns true if the target directory exists and has correct content.

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