From 9e4585db30d5038b541d26b4ad06f715c693e9be Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Fri, 22 Nov 2024 14:43:20 -0500 Subject: [PATCH] clean: delete Dictionary::getProperties which is unused since 2009 --- src/dict/aard.cc | 5 ----- src/dict/bgl.cc | 5 ----- src/dict/dictdfiles.cc | 5 ----- src/dict/dictionary.hh | 11 ----------- src/dict/dictserver.cc | 4 ---- src/dict/dsl.cc | 5 ----- src/dict/epwing.cc | 6 ------ src/dict/forvo.cc | 5 ----- src/dict/gls.cc | 5 ----- src/dict/hunspell.cc | 6 ------ src/dict/lingualibre.cc | 6 ------ src/dict/lsa.cc | 5 ----- src/dict/mdx.cc | 6 ------ src/dict/mediawiki.cc | 5 ----- src/dict/programs.cc | 5 ----- src/dict/sdict.cc | 5 ----- src/dict/slob.cc | 6 ------ src/dict/sounddir.cc | 6 ------ src/dict/stardict.cc | 5 ----- src/dict/transliteration/transliteration.cc | 5 ----- src/dict/transliteration/transliteration.hh | 2 -- src/dict/voiceengines.cc | 4 ---- src/dict/website.cc | 6 ------ src/dict/xdxf.cc | 6 ------ src/dict/zim.cc | 5 ----- src/dict/zipsounds.cc | 4 ---- 26 files changed, 138 deletions(-) diff --git a/src/dict/aard.cc b/src/dict/aard.cc index b4751e723..f988e6598 100644 --- a/src/dict/aard.cc +++ b/src/dict/aard.cc @@ -216,11 +216,6 @@ class AardDictionary: public BtreeIndexing::BtreeDictionary ~AardDictionary(); - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.articleCount; diff --git a/src/dict/bgl.cc b/src/dict/bgl.cc index 2ebd8747a..f11772aa4 100644 --- a/src/dict/bgl.cc +++ b/src/dict/bgl.cc @@ -173,11 +173,6 @@ class BglDictionary: public BtreeIndexing::BtreeDictionary BglDictionary( string const & id, string const & indexFile, string const & dictionaryFile ); - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.articleCount; diff --git a/src/dict/dictdfiles.cc b/src/dict/dictdfiles.cc index 6a3cd4ebe..4e4690ddc 100644 --- a/src/dict/dictdfiles.cc +++ b/src/dict/dictdfiles.cc @@ -91,11 +91,6 @@ class DictdDictionary: public BtreeIndexing::BtreeDictionary ~DictdDictionary(); - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.articleCount; diff --git a/src/dict/dictionary.hh b/src/dict/dictionary.hh index 0d1948382..4e099d6eb 100644 --- a/src/dict/dictionary.hh +++ b/src/dict/dictionary.hh @@ -30,13 +30,6 @@ using std::string; using gd::wstring; using std::map; -enum Property { - Author, - Copyright, - Description, - Email -}; - DEF_EX( Ex, "Dictionary error", std::exception ) DEF_EX( exIndexOutOfRange, "The supplied index is out of range", Ex ) DEF_EX( exSliceOutOfRange, "The requested data slice is out of range", Ex ) @@ -380,10 +373,6 @@ public: metadata_enable_fts = _enable_FTS; } - /// Returns all the available properties, like the author's name, copyright, - /// description etc. All strings are in utf8. - virtual map< Property, string > getProperties() noexcept = 0; - /// Returns the features the dictionary possess. See the Feature enum for /// their list. virtual Features getFeatures() const noexcept diff --git a/src/dict/dictserver.cc b/src/dict/dictserver.cc index 3fc5b71fa..db7981957 100644 --- a/src/dict/dictserver.cc +++ b/src/dict/dictserver.cc @@ -303,10 +303,6 @@ class DictServerDictionary: public Dictionary::Class disconnectFromServer( socket ); } - map< Property, string > getProperties() noexcept override - { - return {}; - } unsigned long getArticleCount() noexcept override { diff --git a/src/dict/dsl.cc b/src/dict/dsl.cc index 0325582fb..71a597f92 100644 --- a/src/dict/dsl.cc +++ b/src/dict/dsl.cc @@ -156,11 +156,6 @@ class DslDictionary: public BtreeIndexing::BtreeDictionary ~DslDictionary(); - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.articleCount; diff --git a/src/dict/epwing.cc b/src/dict/epwing.cc index 5fac6b6be..69b41df00 100644 --- a/src/dict/epwing.cc +++ b/src/dict/epwing.cc @@ -87,12 +87,6 @@ class EpwingDictionary: public BtreeIndexing::BtreeDictionary ~EpwingDictionary(); - - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.articleCount; diff --git a/src/dict/forvo.cc b/src/dict/forvo.cc index 04d14da0a..af5ee64de 100644 --- a/src/dict/forvo.cc +++ b/src/dict/forvo.cc @@ -38,11 +38,6 @@ class ForvoDictionary: public Dictionary::Class } - map< Property, string > getProperties() noexcept override - { - return map< Property, string >(); - } - unsigned long getArticleCount() noexcept override { return 0; diff --git a/src/dict/gls.cc b/src/dict/gls.cc index baab0d170..88516566d 100644 --- a/src/dict/gls.cc +++ b/src/dict/gls.cc @@ -349,11 +349,6 @@ class GlsDictionary: public BtreeIndexing::BtreeDictionary ~GlsDictionary(); - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.articleCount; diff --git a/src/dict/hunspell.cc b/src/dict/hunspell.cc index afe86df62..1e67f6dc5 100644 --- a/src/dict/hunspell.cc +++ b/src/dict/hunspell.cc @@ -55,12 +55,6 @@ class HunspellDictionary: public Dictionary::Class dictionaryName = name_; } - - map< Property, string > getProperties() noexcept override - { - return map< Property, string >(); - } - unsigned long getArticleCount() noexcept override { return 0; diff --git a/src/dict/lingualibre.cc b/src/dict/lingualibre.cc index 881024693..e63d27afa 100644 --- a/src/dict/lingualibre.cc +++ b/src/dict/lingualibre.cc @@ -165,12 +165,6 @@ WHERE { } } - - map< Property, string > getProperties() noexcept override - { - return {}; - } - unsigned long getArticleCount() noexcept override { return 0; diff --git a/src/dict/lsa.cc b/src/dict/lsa.cc index 20a874c81..d6614e335 100644 --- a/src/dict/lsa.cc +++ b/src/dict/lsa.cc @@ -159,11 +159,6 @@ class LsaDictionary: public BtreeIndexing::BtreeDictionary string getName() noexcept override; - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.soundsCount; diff --git a/src/dict/mdx.cc b/src/dict/mdx.cc index 856b2eafd..99aba846f 100644 --- a/src/dict/mdx.cc +++ b/src/dict/mdx.cc @@ -212,12 +212,6 @@ class MdxDictionary: public BtreeIndexing::BtreeDictionary void deferredInit() override; - - map< Dictionary::Property, string > getProperties() noexcept override - { - return {}; - } - unsigned long getArticleCount() noexcept override { return idxHeader.articleCount; diff --git a/src/dict/mediawiki.cc b/src/dict/mediawiki.cc index 8d7badef6..b7a4a65ef 100644 --- a/src/dict/mediawiki.cc +++ b/src/dict/mediawiki.cc @@ -56,11 +56,6 @@ class MediaWikiDictionary: public Dictionary::Class return name; } - map< Property, string > getProperties() noexcept override - { - return map< Property, string >(); - } - unsigned long getArticleCount() noexcept override { return 0; diff --git a/src/dict/programs.cc b/src/dict/programs.cc index 1b1cd0795..13cd69cf7 100644 --- a/src/dict/programs.cc +++ b/src/dict/programs.cc @@ -36,11 +36,6 @@ class ProgramsDictionary: public Dictionary::Class return prg.name.toUtf8().data(); } - map< Property, string > getProperties() noexcept override - { - return map< Property, string >(); - } - unsigned long getArticleCount() noexcept override { return 0; diff --git a/src/dict/sdict.cc b/src/dict/sdict.cc index dff686f13..fd4877a00 100644 --- a/src/dict/sdict.cc +++ b/src/dict/sdict.cc @@ -113,11 +113,6 @@ class SdictDictionary: public BtreeIndexing::BtreeDictionary ~SdictDictionary(); - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.articleCount; diff --git a/src/dict/slob.cc b/src/dict/slob.cc index 373465b4d..e6b82ade5 100644 --- a/src/dict/slob.cc +++ b/src/dict/slob.cc @@ -610,12 +610,6 @@ class SlobDictionary: public BtreeIndexing::BtreeDictionary ~SlobDictionary(); - - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.articleCount; diff --git a/src/dict/sounddir.cc b/src/dict/sounddir.cc index c0e2b2993..7806bd2b7 100644 --- a/src/dict/sounddir.cc +++ b/src/dict/sounddir.cc @@ -75,12 +75,6 @@ class SoundDirDictionary: public BtreeIndexing::BtreeDictionary vector< string > const & dictionaryFiles, QString const & iconFilename_ ); - - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.soundsCount; diff --git a/src/dict/stardict.cc b/src/dict/stardict.cc index b6bf2749e..517752dca 100644 --- a/src/dict/stardict.cc +++ b/src/dict/stardict.cc @@ -134,11 +134,6 @@ class StardictDictionary: public BtreeIndexing::BtreeDictionary ~StardictDictionary(); - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.wordCount; diff --git a/src/dict/transliteration/transliteration.cc b/src/dict/transliteration/transliteration.cc index 400b1c03b..b39d27bb1 100644 --- a/src/dict/transliteration/transliteration.cc +++ b/src/dict/transliteration/transliteration.cc @@ -26,11 +26,6 @@ string BaseTransliterationDictionary::getName() noexcept return name; } -map< Dictionary::Property, string > BaseTransliterationDictionary::getProperties() noexcept -{ - return map< Dictionary::Property, string >(); -} - unsigned long BaseTransliterationDictionary::getArticleCount() noexcept { return 0; diff --git a/src/dict/transliteration/transliteration.hh b/src/dict/transliteration/transliteration.hh index a5623038d..7003cd738 100644 --- a/src/dict/transliteration/transliteration.hh +++ b/src/dict/transliteration/transliteration.hh @@ -28,8 +28,6 @@ public: virtual string getName() noexcept; - virtual map< Dictionary::Property, string > getProperties() noexcept; - virtual unsigned long getArticleCount() noexcept; virtual unsigned long getWordCount() noexcept; diff --git a/src/dict/voiceengines.cc b/src/dict/voiceengines.cc index 8e988f090..26c307d39 100644 --- a/src/dict/voiceengines.cc +++ b/src/dict/voiceengines.cc @@ -47,10 +47,6 @@ class VoiceEnginesDictionary: public Dictionary::Class return voiceEngine.name.toUtf8().data(); } - map< Property, string > getProperties() noexcept override - { - return map< Property, string >(); - } unsigned long getArticleCount() noexcept override { diff --git a/src/dict/website.cc b/src/dict/website.cc index 4db4c58f2..4f229a4d6 100644 --- a/src/dict/website.cc +++ b/src/dict/website.cc @@ -52,12 +52,6 @@ class WebSiteDictionary: public Dictionary::Class dictionaryDescription = urlTemplate_; } - - map< Property, string > getProperties() noexcept override - { - return map< Property, string >(); - } - unsigned long getArticleCount() noexcept override { return 0; diff --git a/src/dict/xdxf.cc b/src/dict/xdxf.cc index 298016be5..2fae7ff21 100644 --- a/src/dict/xdxf.cc +++ b/src/dict/xdxf.cc @@ -140,12 +140,6 @@ class XdxfDictionary: public BtreeIndexing::BtreeDictionary ~XdxfDictionary(); - - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } - unsigned long getArticleCount() noexcept override { return idxHeader.articleCount; diff --git a/src/dict/zim.cc b/src/dict/zim.cc index 1250a2523..4efe63166 100644 --- a/src/dict/zim.cc +++ b/src/dict/zim.cc @@ -161,11 +161,6 @@ class ZimDictionary: public BtreeIndexing::BtreeDictionary ~ZimDictionary() = default; - map< Dictionary::Property, string > getProperties() noexcept override - { - return {}; - } - unsigned long getArticleCount() noexcept override { return idxHeader.articleCount; diff --git a/src/dict/zipsounds.cc b/src/dict/zipsounds.cc index eb1ebcce7..b6e73b288 100644 --- a/src/dict/zipsounds.cc +++ b/src/dict/zipsounds.cc @@ -107,10 +107,6 @@ class ZipSoundsDictionary: public BtreeIndexing::BtreeDictionary string getName() noexcept override; - map< Dictionary::Property, string > getProperties() noexcept override - { - return map< Dictionary::Property, string >(); - } unsigned long getArticleCount() noexcept override {