Forráskód Böngészése

Use descriptive names for member variables.

Sascha Zelzer 12 éve
szülő
commit
0a66f92ea1

+ 8 - 13
Libs/CommandLineModules/Core/ctkCmdLineModuleManager.cpp

@@ -42,7 +42,8 @@ struct ctkCmdLineModuleManagerPrivate
 
   ctkCmdLineModuleFactory* InstanceFactory;
 
-  QHash<QString, ctkCmdLineModuleReference> Cache;
+  QHash<QString, ctkCmdLineModuleReference> LocationToRef;
+
   bool Verbose;
 };
 
@@ -105,26 +106,26 @@ ctkCmdLineModuleManager::registerModule(const QString& location)
 
   ref.d->RawXmlDescription = xml;
 
-  d->Cache[location] = ref;
+  d->LocationToRef[location] = ref;
 
-  emit moduleAdded(ref);
+  emit moduleRegistered(ref);
   return ref;
 }
 
 void ctkCmdLineModuleManager::unregisterModule(const ctkCmdLineModuleReference& ref)
 {
-  d->Cache.remove(ref.location());
-  emit moduleRemoved(ref);
+  d->LocationToRef.remove(ref.location());
+  emit moduleUnregistered(ref);
 }
 
 ctkCmdLineModuleReference ctkCmdLineModuleManager::moduleReference(const QString& location) const
 {
-  return d->Cache[location];
+  return d->LocationToRef[location];
 }
 
 QList<ctkCmdLineModuleReference> ctkCmdLineModuleManager::moduleReferences() const
 {
-  return d->Cache.values();
+  return d->LocationToRef.values();
 }
 
 ctkCmdLineModule*
@@ -132,9 +133,3 @@ ctkCmdLineModuleManager::createModule(const ctkCmdLineModuleReference& moduleRef
 {
   return d->InstanceFactory->create(moduleRef);
 }
-
-QList<ctkCmdLineModule*>
-ctkCmdLineModuleManager::modules(const ctkCmdLineModuleReference& moduleRef) const
-{
-  throw ctkException("not implemented yet");
-}

+ 0 - 2
Libs/CommandLineModules/Core/ctkCmdLineModuleManager.h

@@ -70,8 +70,6 @@ public:
 
   ctkCmdLineModule* createModule(const ctkCmdLineModuleReference& moduleRef);
 
-  QList<ctkCmdLineModule*> modules(const ctkCmdLineModuleReference& moduleRef) const;
-
 Q_SIGNALS:
 
   void moduleRegistered(const ctkCmdLineModuleReference&);