Closed bernschab closed 12 years ago
sorry, simply forgot about those. variables are dropped now.
true, by default it is not possible that paths are stored more than once, but last time we said just in case of a somehow strangely broken .conf file, we check for this case nonetheless. if I pull a stunt like list(set(originallist)), can I be sure that the elements have the same relative order afterwards? plus, how can I find out if anything was deleted at all and HOW MANY elements where deleted? that would be required, in order to keep the list at exactly the same lengh, wouldn't it?
will fix the other issues immediately.
@ multiple elements in the list: This check was because of the backwards compatibility IIRC.
@ uniquifying: True, the order would not be preserved. This should still be more readable:
self.recentfiles = []
for i in range(self.nrRecentFiles):
...
filename = self.settings.value("Filename").toString()
if not filename in self.recentfiles:
recentfiles.append(filename)
else:
recentfiles.append("")
(NB: untested)