diff options
Diffstat (limited to 'src/libs/installer/component.cpp')
-rw-r--r-- | src/libs/installer/component.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index db9f2689d..da0230ade 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -43,6 +43,7 @@ #include <productkeycheck.h> #include <QtCore/QDirIterator> +#include <QtCore/QRegExp> #include <QtCore/QTranslator> #include <QApplication> @@ -1241,9 +1242,13 @@ bool Component::isDefault() const return d->m_vars.value(scDefault).compare(scTrue, Qt::CaseInsensitive) == 0; } -bool Component::isInstalled() const +bool Component::isInstalled(const QString version) const { - return scInstalled == d->m_vars.value(scCurrentState); + if (version.isEmpty()) { + return scInstalled == d->m_vars.value(scCurrentState); + } else { + return d->m_vars.value(scInstalledVersion) == version; + } } /*! |