GUI: Make three Get*() methods const methods.

This commit is contained in:
Kimmo Varis 2009-06-20 20:55:28 +03:00
parent 2eff269e60
commit 210014b930
2 changed files with 6 additions and 6 deletions

View File

@ -59,12 +59,12 @@ void ApplicationList::SaveSettings(QSettings &programSettings)
} }
int ApplicationList::GetApplicationCount() int ApplicationList::GetApplicationCount() const
{ {
return mApplications.size(); return mApplications.size();
} }
QString ApplicationList::GetApplicationName(const int index) QString ApplicationList::GetApplicationName(const int index) const
{ {
if (index >= 0 && index < mApplications.size()) if (index >= 0 && index < mApplications.size())
{ {
@ -74,7 +74,7 @@ QString ApplicationList::GetApplicationName(const int index)
return QString(); return QString();
} }
QString ApplicationList::GetApplicationPath(const int index) QString ApplicationList::GetApplicationPath(const int index) const
{ {
if (index >= 0 && index < mApplications.size()) if (index >= 0 && index < mApplications.size())
{ {

View File

@ -84,7 +84,7 @@ public:
* @brief Get the amount of applications in the list * @brief Get the amount of applications in the list
* @return The count of applications * @return The count of applications
*/ */
int GetApplicationCount(); int GetApplicationCount() const;
/** /**
* @brief Get spesific application's name * @brief Get spesific application's name
@ -92,7 +92,7 @@ public:
* @param index Index of the application whose name to get * @param index Index of the application whose name to get
* @return Name of the application * @return Name of the application
*/ */
QString GetApplicationName(const int index); QString GetApplicationName(const int index) const;
/** /**
* @brief Get Application's path * @brief Get Application's path
@ -100,7 +100,7 @@ public:
* @param index of the application whose path to get * @param index of the application whose path to get
* @return Application's path * @return Application's path
*/ */
QString GetApplicationPath(const int index); QString GetApplicationPath(const int index) const;
/** /**
* @brief Modify an application * @brief Modify an application