From 02b859b819343cd0c5da300ea6ac3589d9316112 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Tue, 26 Jul 2011 16:33:55 +0200 Subject: added an updateIsAvailable flag to component class Reviewed-By: Niels Weber --- installerbuilder/libinstaller/component.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'installerbuilder/libinstaller/component.cpp') diff --git a/installerbuilder/libinstaller/component.cpp b/installerbuilder/libinstaller/component.cpp index ad5473ca0..533607357 100644 --- a/installerbuilder/libinstaller/component.cpp +++ b/installerbuilder/libinstaller/component.cpp @@ -987,7 +987,23 @@ bool Component::installationRequested() const } /*! - Set's the components state to uninstalled. + Sets a flag that the core found an update +*/ +void Component::setUpdateAvailable(bool isUpdateAvailable) +{ + d->m_updateIsAvailable = isUpdateAvailable; +} + +/*! + Determines if the user wants to install the update for this component +*/ +bool Component::updateRequested() +{ + return d->m_updateIsAvailable && isSelected(); +} + +/*! + Sets the component state to uninstalled. */ void Component::setUninstalled() { -- cgit v1.2.3