@@ -52,14 +52,14 @@ void ApplicationList::LoadSettings(QSettings *programSettings)
5252 // use as default for gnome environments
5353 if (QFileInfo (" /usr/bin/gedit" ).isExecutable ())
5454 {
55- AddApplicationType (" gedit" , " /usr/bin/gedit +(line) (file)" );
55+ AddApplication (" gedit" , " /usr/bin/gedit +(line) (file)" );
5656 defapp = 0 ;
5757 break ;
5858 }
5959 // use as default for kde environments
6060 if (QFileInfo (" /usr/bin/kate" ).isExecutable ())
6161 {
62- AddApplicationType (" kate" , " /usr/bin/kate -l(line) (file)" );
62+ AddApplication (" kate" , " /usr/bin/kate -l(line) (file)" );
6363 defapp = 0 ;
6464 break ;
6565 }
@@ -77,7 +77,7 @@ void ApplicationList::LoadSettings(QSettings *programSettings)
7777 {
7878 for (int i = 0 ; i < names.size (); i++)
7979 {
80- AddApplicationType (names[i], paths[i]);
80+ AddApplication (names[i], paths[i]);
8181 }
8282 mDefaultApplicationIndex = 1 ;
8383 }
@@ -126,9 +126,9 @@ QString ApplicationList::GetApplicationPath(const int index) const
126126
127127}
128128
129- void ApplicationList::SetApplicationType (const int index,
130- const QString &name,
131- const QString &path)
129+ void ApplicationList::SetApplication (const int index,
130+ const QString &name,
131+ const QString &path)
132132{
133133 if (index >= 0 && index < mApplications .size ())
134134 {
@@ -137,7 +137,7 @@ void ApplicationList::SetApplicationType(const int index,
137137 }
138138}
139139
140- void ApplicationList::AddApplicationType (const QString &name, const QString &path)
140+ void ApplicationList::AddApplication (const QString &name, const QString &path)
141141{
142142 if (name.isEmpty () || path.isEmpty ())
143143 {
@@ -163,7 +163,7 @@ void ApplicationList::SetDefault(const int index)
163163 }
164164}
165165
166- void ApplicationList::Copy (ApplicationList *list)
166+ void ApplicationList::Copy (const ApplicationList *list)
167167{
168168 if (!list)
169169 {
@@ -173,7 +173,7 @@ void ApplicationList::Copy(ApplicationList *list)
173173 Clear ();
174174 for (int i = 0 ; i < list->GetApplicationCount (); i++)
175175 {
176- AddApplicationType (list->GetApplicationName (i), list->GetApplicationPath (i));
176+ AddApplication (list->GetApplicationName (i), list->GetApplicationPath (i));
177177 }
178178 mDefaultApplicationIndex = list->GetDefaultApplication ();
179179}
@@ -190,15 +190,15 @@ bool ApplicationList::FindDefaultWindowsEditor()
190190 const QString notepadppPath = appPath + " \\ Notepad++\\ notepad++.exe" ;
191191 if (QFileInfo (notepadppPath).isExecutable ())
192192 {
193- AddApplicationType (" Notepad++" , " \" " + notepadppPath + " \" -n(line) (file)" );
193+ AddApplication (" Notepad++" , " \" " + notepadppPath + " \" -n(line) (file)" );
194194 return true ;
195195 }
196196
197197 const QString windowsPath (getenv (" windir" ));
198198 const QString notepadPath = windowsPath + " \\ system32\\ notepad.exe" ;
199199 if (QFileInfo (notepadPath).isExecutable ())
200200 {
201- AddApplicationType (" Notepad" , notepadPath + " (file)" );
201+ AddApplication (" Notepad" , notepadPath + " (file)" );
202202 return true ;
203203 }
204204 return false ;
0 commit comments