Skip to content

Commit

Permalink
Unique without a set.
Browse files Browse the repository at this point in the history
  • Loading branch information
textbrowser committed Dec 19, 2024
1 parent 25efb2a commit 36d29c4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Source/biblioteq_d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,16 @@ QString biblioteq::formattedISBN13(const QString &str) const

QStringList biblioteq::scripts(void) const
{
QMap<QString, char> map;
auto list
(QSettings().value("otheroptions/scripts", "").
toString().trimmed().split('\n') +
m_specialExecutables.keys());

list = list.toSet().toList(); // List of unique elements.
std::sort(list.begin(), list.end());
return list;
foreach(auto const &str, list)
map[str] = 0;

return map.keys();
}

QStringList biblioteq::selectedISBN10s(void) const
Expand Down

0 comments on commit 36d29c4

Please sign in to comment.