summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-05-30 21:32:04 +0200
committerMikaël Capelle <capelle.mikael@gmail.com>2020-05-30 21:32:04 +0200
commit1dc98e3af2f1c2296d4691c578e70d0ddeb810a1 (patch)
tree84d1538f279b1fa9c5defc0b0108440734013b24
parente9595ec91a91c00b1fda58305796591b510efdbf (diff)
Small update to installation manager following uibase changes.
-rw-r--r--src/installationmanager.cpp10
-rw-r--r--src/installationmanager.h8
2 files changed, 7 insertions, 11 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp
index b5efc5f6..66fd2e97 100644
--- a/src/installationmanager.cpp
+++ b/src/installationmanager.cpp
@@ -527,12 +527,12 @@ IPluginInstaller::EInstallResult InstallationManager::doInstall(GuessedValue<QSt
}
-bool InstallationManager::wasCancelled()
+bool InstallationManager::wasCancelled() const
{
return m_ArchiveHandler->getLastError() == Archive::ERROR_EXTRACT_CANCELLED;
}
-bool InstallationManager::isRunning()
+bool InstallationManager::isRunning() const
{
return m_IsRunning;
}
@@ -828,9 +828,5 @@ void InstallationManager::registerInstaller(IPluginInstaller *installer)
QStringList InstallationManager::getSupportedExtensions() const
{
- QStringList result;
- foreach (const QString &extension, m_SupportedExtensions) {
- result.append(extension);
- }
- return result;
+ return QStringList(std::begin(m_SupportedExtensions), std::end(m_SupportedExtensions));
}
diff --git a/src/installationmanager.h b/src/installationmanager.h
index bdc9eafc..cb355641 100644
--- a/src/installationmanager.h
+++ b/src/installationmanager.h
@@ -88,12 +88,12 @@ public:
/**
* @return true if the installation was canceled
**/
- bool wasCancelled();
+ bool wasCancelled() const;
/**
* @return true if an installation is currently in progress
**/
- bool isRunning();
+ bool isRunning() const;
/**
* @brief retrieve a string describing the specified error code
@@ -111,9 +111,9 @@ public:
void registerInstaller(MOBase::IPluginInstaller *installer);
/**
- * @return list of file extensions we can install
+ * @return the extensions of archives supported by this installation manager.
*/
- QStringList getSupportedExtensions() const;
+ QStringList getSupportedExtensions() const override;
/**
* @brief Extract the specified file from the currently opened archive to a temporary location.