diff options
author | kh <karsten.heimrich@theqtcompany.com> | 2014-11-25 16:18:26 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2014-12-10 08:54:18 +0100 |
commit | 4853be33e29654304af4209b38137541068c1662 (patch) | |
tree | 71ea26e92db160ecdffc0bcc8b8c621bab9a4cf4 /src/libs/installer/packagemanagergui.cpp | |
parent | 7c2d08ca09875224ee7dca480d91a07bcc7719a6 (diff) |
Add possibility to specify a control script.
Right now we support control scripts just as command line argument,
but now we can also bundle it in the binary as well. This helps e.g.
with running scripts during uninstallation, enables the possibility
to modify the introduction page or enables headless installer builds.
Task-number: QTIFW-495
Task-number: QTIFW-166
Change-Id: I6fee6a55db78ed28b1eeb8257a4febaa2703c04e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/packagemanagergui.cpp')
-rw-r--r-- | src/libs/installer/packagemanagergui.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp index 35a509f22..4653c7ff6 100644 --- a/src/libs/installer/packagemanagergui.cpp +++ b/src/libs/installer/packagemanagergui.cpp @@ -504,7 +504,7 @@ void PackageManagerGui::wizardPageInsertionRequested(QWidget *widget, void PackageManagerGui::wizardPageRemovalRequested(QWidget *widget) { foreach (int pageId, pageIds()) { - DynamicInstallerPage *const dynamicPage = dynamic_cast<DynamicInstallerPage*>(page(pageId)); + DynamicInstallerPage *const dynamicPage = qobject_cast<DynamicInstallerPage*>(page(pageId)); if (dynamicPage == 0) continue; if (dynamicPage->widget() != widget) @@ -1007,8 +1007,6 @@ bool IntroductionPage::validatePage() setErrorMessage(core->error()); } - callControlScript(QLatin1String("UpdaterSelectedCallback")); - if (m_updatesFetched) { if (core->components(QInstaller::PackageManagerCore::ComponentType::Root).count() <= 0) setErrorMessage(QString::fromLatin1("<b>%1</b>").arg(tr("No updates available."))); @@ -1038,8 +1036,6 @@ bool IntroductionPage::validatePage() } } - callControlScript(QLatin1String("PackageManagerSelectedCallback")); - if (m_allPackagesFetched || localPackagesTreeFetched) setComplete(true); } @@ -1121,14 +1117,6 @@ void IntroductionPage::setErrorMessage(const QString &error) #endif } -void IntroductionPage::callControlScript(const QString &callback) -{ - // Initialize the gui. Needs to be done after check repositories as only then the ui can handle - // hide of pages depending on the components. - gui()->init(); - gui()->callControlScriptMethod(callback); -} - bool IntroductionPage::validRepositoriesAvailable() const { const PackageManagerCore *const core = packageManagerCore(); |