Katana libraries
Revision | 73c729f27b19bcf44b251dbb477bf4000db63f3a (tree) |
---|---|
Time | 2023-01-01 11:04:21 |
Author | Ivailo Monev <xakepa10@gmai...> |
Commiter | Ivailo Monev |
kdecore: remove unused and private members
note that KSycocaFactory also has a d member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
@@ -93,9 +93,6 @@ public: // public for KBuildServiceFactory | ||
93 | 93 | |
94 | 94 | protected: |
95 | 95 | virtual MimeTypeEntry *createEntry(int offset) const; |
96 | -private: | |
97 | - // d pointer: useless since this header is not installed | |
98 | - //class KMimeTypeFactoryPrivate* d; | |
99 | 96 | }; |
100 | 97 | |
101 | 98 | #endif |
@@ -114,9 +114,6 @@ protected: | ||
114 | 114 | int m_relNameDictOffset; |
115 | 115 | KSycocaDict *m_menuIdDict; |
116 | 116 | int m_menuIdDictOffset; |
117 | - | |
118 | -private: | |
119 | - class KServiceFactoryPrivate* d; | |
120 | 117 | }; |
121 | 118 | |
122 | 119 | #endif |
@@ -68,9 +68,6 @@ protected: | ||
68 | 68 | KServiceGroup* createEntry(int offset) const; |
69 | 69 | KSycocaDict *m_baseGroupDict; |
70 | 70 | int m_baseGroupDictOffset; |
71 | - | |
72 | -private: | |
73 | - class KServiceGroupFactoryPrivate* d; | |
74 | 71 | }; |
75 | 72 | |
76 | 73 | #endif |
@@ -82,9 +82,6 @@ protected: | ||
82 | 82 | |
83 | 83 | // protected for KBuildServiceTypeFactory |
84 | 84 | QMap<QString,int> m_propertyTypeDict; |
85 | - | |
86 | -private: | |
87 | - class KServiceTypeFactoryPrivate* d; | |
88 | 85 | }; |
89 | 86 | |
90 | 87 | #endif |
@@ -56,7 +56,7 @@ KProtocolInfo::KProtocolInfo(const QString &path) | ||
56 | 56 | m_determineMimetypeFromExtension = config.readEntry("determineMimetypeFromExtension", true); |
57 | 57 | m_icon = config.readEntry("Icon", QString()); |
58 | 58 | m_config = config.readEntry("config", m_name); |
59 | - m_maxSlaves = config.readEntry( "maxInstances", 1); | |
59 | + m_maxSlaves = config.readEntry("maxInstances", 1); | |
60 | 60 | |
61 | 61 | d->canRenameFromFile = config.readEntry("renameFromFile", false); |
62 | 62 | d->canRenameToFile = config.readEntry("renameToFile", false); |
@@ -68,7 +68,7 @@ KProtocolInfo::KProtocolInfo(const QString &path) | ||
68 | 68 | } else if (fnu == QLatin1String("DisplayName")) { |
69 | 69 | d->fileNameUsedForCopying = DisplayName; |
70 | 70 | } |
71 | - d->maxSlavesPerHost = config.readEntry( "maxInstancesPerHost", 0); | |
71 | + d->maxSlavesPerHost = config.readEntry("maxInstancesPerHost", 0); | |
72 | 72 | d->docPath = config.readPathEntry("X-DocPath", QString()); |
73 | 73 | d->protClass = config.readEntry("Class").toLower(); |
74 | 74 | if (d->protClass[0] != QLatin1Char(':')) { |
@@ -38,26 +38,23 @@ KProtocolInfoFactory::~KProtocolInfoFactory() | ||
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | -KProtocolInfo* | |
42 | -KProtocolInfoFactory::createEntry(int offset) const | |
41 | +KProtocolInfo* KProtocolInfoFactory::createEntry(int offset) const | |
43 | 42 | { |
44 | - KProtocolInfo *info = 0; | |
45 | - KSycocaType type; | |
46 | - QDataStream *str = KSycoca::self()->findEntry(offset, type); | |
47 | - switch (type) | |
48 | - { | |
49 | - case KST_KProtocolInfo: | |
50 | - info = new KProtocolInfo(*str, offset); | |
51 | - break; | |
52 | - default: | |
53 | - return 0; | |
54 | - } | |
55 | - if (!info->isValid()) | |
56 | - { | |
57 | - delete info; | |
58 | - info = 0; | |
59 | - } | |
60 | - return info; | |
43 | + KProtocolInfo *info = 0; | |
44 | + KSycocaType type; | |
45 | + QDataStream *str = KSycoca::self()->findEntry(offset, type); | |
46 | + switch (type) { | |
47 | + case KST_KProtocolInfo: | |
48 | + info = new KProtocolInfo(*str, offset); | |
49 | + break; | |
50 | + default: | |
51 | + return 0; | |
52 | + } | |
53 | + if (!info->isValid()) { | |
54 | + delete info; | |
55 | + info = 0; | |
56 | + } | |
57 | + return info; | |
61 | 58 | } |
62 | 59 | |
63 | 60 |
@@ -88,30 +85,34 @@ KProtocolInfo::List KProtocolInfoFactory::allProtocols() const | ||
88 | 85 | |
89 | 86 | KProtocolInfo::Ptr KProtocolInfoFactory::findProtocol(const QString &protocol) |
90 | 87 | { |
91 | - if (!sycocaDict()) return KProtocolInfo::Ptr(); // Error! | |
92 | - | |
93 | - QMap<QString,KProtocolInfo::Ptr>::iterator it = m_cache.find(protocol); | |
94 | - if (it != m_cache.end()) | |
95 | - return *it; | |
88 | + if (!sycocaDict()) { | |
89 | + return KProtocolInfo::Ptr(); // Error! | |
90 | + } | |
96 | 91 | |
97 | - int offset = sycocaDict()->find_string( protocol ); | |
92 | + QMap<QString,KProtocolInfo::Ptr>::iterator it = m_cache.find(protocol); | |
93 | + if (it != m_cache.end()) { | |
94 | + return *it; | |
95 | + } | |
98 | 96 | |
99 | - if (!offset) return KProtocolInfo::Ptr(); // Not found; | |
97 | + int offset = sycocaDict()->find_string(protocol); | |
98 | + if (!offset) { | |
99 | + return KProtocolInfo::Ptr(); // Not found; | |
100 | + } | |
100 | 101 | |
101 | - KProtocolInfo::Ptr info(createEntry(offset)); | |
102 | + KProtocolInfo::Ptr info(createEntry(offset)); | |
102 | 103 | |
103 | - if (info && (info->name() != protocol)) | |
104 | - { | |
105 | - // No it wasn't... | |
106 | - return KProtocolInfo::Ptr(); // Not found | |
107 | - } | |
108 | - m_cache.insert(protocol,info); | |
109 | - return info; | |
104 | + if (info && (info->name() != protocol)) { | |
105 | + // No it wasn't... | |
106 | + return KProtocolInfo::Ptr(); // Not found | |
107 | + } | |
108 | + m_cache.insert(protocol, info); | |
109 | + return info; | |
110 | 110 | } |
111 | 111 | |
112 | 112 | KProtocolInfoFactory* KProtocolInfoFactory::self() |
113 | 113 | { |
114 | - if (!kProtocolInfoFactoryInstance) | |
114 | + if (!kProtocolInfoFactoryInstance) { | |
115 | 115 | kProtocolInfoFactoryInstance = new KProtocolInfoFactory(); |
116 | + } | |
116 | 117 | return kProtocolInfoFactoryInstance; |
117 | 118 | } |
@@ -86,7 +86,6 @@ protected: | ||
86 | 86 | |
87 | 87 | private: |
88 | 88 | QMap<QString,KProtocolInfo::Ptr> m_cache; |
89 | - class KProtocolInfoFactoryPrivate* d; | |
90 | 89 | }; |
91 | 90 | |
92 | 91 | #endif |