From 36d29c4d6a066dbbc4b17d8e689e7e0375f826b3 Mon Sep 17 00:00:00 2001 From: textbrowser Date: Thu, 19 Dec 2024 18:28:42 -0500 Subject: [PATCH] Unique without a set. --- Source/biblioteq_d.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/biblioteq_d.cc b/Source/biblioteq_d.cc index 87785ac3..8aec1f0f 100644 --- a/Source/biblioteq_d.cc +++ b/Source/biblioteq_d.cc @@ -91,14 +91,16 @@ QString biblioteq::formattedISBN13(const QString &str) const QStringList biblioteq::scripts(void) const { + QMap 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