diff options
author | Andreas Holzammer <andreas.holzammer.qnx@kdab.com> | 2012-04-25 13:21:12 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@nokia.com> | 2012-04-25 16:17:08 +0200 |
commit | 84a7443c75ea3c22d06290ec1fa2e6cf193b20f1 (patch) | |
tree | 0515956273f7822aa5b4970b7684824738d7683b /src/libs/installer/component.cpp | |
parent | f691fd7ae2b1c9494174128289f1ade9e5ebdb03 (diff) |
Add possibility to verify custom pages.
Introduce setValidatorForCustomPage, to set a validator
for a custom page.
Change-Id: I24739d9544c20e0b2b1beab1ae90f8b98cc3d542
Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'src/libs/installer/component.cpp')
-rw-r--r-- | src/libs/installer/component.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index 8baa4635f..6443819d9 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -917,6 +917,18 @@ bool Component::forcedInstallation() const return value(scForcedInstallation, scFalse).toLower() == scTrue; } +void Component::setValidatorCallbackName(const QString &name) +{ + validatorCallbackName = name; +} + +bool Component::validatePage() +{ + if (!validatorCallbackName.isEmpty()) + return callScriptMethod(validatorCallbackName).toBool(); + return true; +} + /*! Marks the component for installation. Emits the selectedChanged() signal if the check state changes. */ |