Skip to content

Commit 210014b

Browse files
committed
GUI: Make three Get*() methods const methods.
1 parent 2eff269 commit 210014b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

gui/applicationlist.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ void ApplicationList::SaveSettings(QSettings &programSettings)
5959

6060
}
6161

62-
int ApplicationList::GetApplicationCount()
62+
int ApplicationList::GetApplicationCount() const
6363
{
6464
return mApplications.size();
6565
}
6666

67-
QString ApplicationList::GetApplicationName(const int index)
67+
QString ApplicationList::GetApplicationName(const int index) const
6868
{
6969
if (index >= 0 && index < mApplications.size())
7070
{
@@ -74,7 +74,7 @@ QString ApplicationList::GetApplicationName(const int index)
7474
return QString();
7575
}
7676

77-
QString ApplicationList::GetApplicationPath(const int index)
77+
QString ApplicationList::GetApplicationPath(const int index) const
7878
{
7979
if (index >= 0 && index < mApplications.size())
8080
{

gui/applicationlist.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,23 +84,23 @@ class ApplicationList : public QObject
8484
* @brief Get the amount of applications in the list
8585
* @return The count of applications
8686
*/
87-
int GetApplicationCount();
87+
int GetApplicationCount() const;
8888

8989
/**
9090
* @brief Get spesific application's name
9191
*
9292
* @param index Index of the application whose name to get
9393
* @return Name of the application
9494
*/
95-
QString GetApplicationName(const int index);
95+
QString GetApplicationName(const int index) const;
9696

9797
/**
9898
* @brief Get Application's path
9999
*
100100
* @param index of the application whose path to get
101101
* @return Application's path
102102
*/
103-
QString GetApplicationPath(const int index);
103+
QString GetApplicationPath(const int index) const;
104104

105105
/**
106106
* @brief Modify an application

0 commit comments

Comments
 (0)