Browse Source

STYLE: PluginFramework: Renamed PluginConstants to ctkPluginConstants

Sascha Zelzer 14 years ago
parent
commit
4e9717a9eb

+ 1 - 1
Libs/PluginFramework/Testing/Cpp/ctkLDAPExpreTest.cpp

@@ -57,7 +57,7 @@ int TestParsing( )
   {
     ctkLDAPExpr ldap( "(cn=Babs Jensen)" );
     ldap = ctkLDAPExpr( "(!(cn=Tim Howes))" );
-    ldap = ctkLDAPExpr( "(&(" + PluginConstants::OBJECTCLASS + "=Person)(|(sn=Jensen)(cn=Babs J*)))" );
+    ldap = ctkLDAPExpr( "(&(" + ctkPluginConstants::OBJECTCLASS + "=Person)(|(sn=Jensen)(cn=Babs J*)))" );
     ldap = ctkLDAPExpr( "(o=univ*of*mich*)" );
     ldap = ctkLDAPExpr( "(cn=Babs Jensen)" );
   }

+ 1 - 1
Libs/PluginFramework/ctkLDAPExpr.cpp

@@ -68,7 +68,7 @@ QSet<QString> ctkLDAPExpr::getMatchedObjectClasses() const
   QSet<QString> objClasses;
   if (d->m_operator == EQ) 
   {
-    if (d->m_attrName.compare(PluginConstants::OBJECTCLASS, Qt::CaseInsensitive) &&
+    if (d->m_attrName.compare(ctkPluginConstants::OBJECTCLASS, Qt::CaseInsensitive) &&
       d->m_attrValue.indexOf(WILDCARD) < 0) 
     {
       objClasses.insert( d->m_attrValue );

+ 5 - 5
Libs/PluginFramework/ctkPlugin.h

@@ -112,7 +112,7 @@ public:
      * include:
      * <ul>
      * <li>The plugin's required plugin dependencies from its
-     * {@link PluginConstants::REQUIRE_PLUGIN} Manifest header.
+     * {@link ctkPluginConstants::REQUIRE_PLUGIN} Manifest header.
      * </ul>
      * <p>
      * Note that the plugin is not active yet. A plugin must be put in the
@@ -133,7 +133,7 @@ public:
      * <code>ACTIVE</code> state.
      * <p>
      * If the plugin does not have a
-     * {@link PluginConstants#ACTIVATION_EAGER eager activation policy}, then the
+     * {@link ctkPluginConstants#ACTIVATION_EAGER eager activation policy}, then the
      * plugin may remain in this state for some time until the activation is
      * triggered.
      */
@@ -187,14 +187,14 @@ public:
     /**
      * The plugin start operation must activate the plugin according to the
      * plugin's declared
-     * {@link PluginConstants#PLUGIN_ACTIVATIONPOLICY activation policy}.
+     * {@link ctkPluginConstants#PLUGIN_ACTIVATIONPOLICY activation policy}.
      *
      * <p>
      * This bit may be set when calling {@link #start(const StartOptions&)} to notify the
      * framework that the plugin must be activated using the plugin's declared
      * activation policy.
      *
-     * @see PluginConstants#PLUGIN_ACTIVATIONPOLICY
+     * @see ctkPluginConstants#PLUGIN_ACTIVATIONPOLICY
      * @see #start(const StartOptions&)
      */
     START_ACTIVATION_POLICY
@@ -284,7 +284,7 @@ public:
    * followed when this plugin's activation is later triggered.
    * </ul>
    * If the {@link #START_ACTIVATION_POLICY} option is set and this
-   * plugin's declared activation policy is {@link PluginConstants#ACTIVATION_EAGER
+   * plugin's declared activation policy is {@link ctkPluginConstants#ACTIVATION_EAGER
    * eager} then:
    * <i></i>
    * <li>This plugin's state is set to <code>STARTING</code>.

+ 20 - 20
Libs/PluginFramework/ctkPluginConstants.cpp

@@ -21,30 +21,30 @@
 
 #include "ctkPluginConstants.h"
 
-const QString	PluginConstants::SYSTEM_PLUGIN_LOCATION = "System Plugin";
-const QString	PluginConstants::SYSTEM_PLUGIN_SYMBOLICNAME = "system.plugin";
+const QString	ctkPluginConstants::SYSTEM_PLUGIN_LOCATION = "System Plugin";
+const QString	ctkPluginConstants::SYSTEM_PLUGIN_SYMBOLICNAME = "system.plugin";
 
-const QString PluginConstants::FRAMEWORK_STORAGE = "org.commontk.pluginfw.storage";
+const QString ctkPluginConstants::FRAMEWORK_STORAGE = "org.commontk.pluginfw.storage";
 
-const QString	PluginConstants::PLUGIN_SYMBOLICNAME = "Plugin-SymbolicName";
-const QString PluginConstants::PLUGIN_COPYRIGHT = "Plugin-Copyright";
-const QString PluginConstants::PLUGIN_DESCRIPTION = "Plugin-Description";
-const QString PluginConstants::PLUGIN_NAME = "Plugin-Name";
-const QString PluginConstants::PLUGIN_LOCALIZATION = "Plugin-Localization";
-const QString PluginConstants::PLUGIN_LOCALIZATION_DEFAULT_BASENAME = "CTK-INF/l10n/plugin";
-const QString PluginConstants::REQUIRE_PLUGIN = "Require-Plugin";
-const QString PluginConstants::PLUGIN_VERSION_ATTRIBUTE = "plugin-version";
-const QString	PluginConstants::PLUGIN_VERSION = "Plugin-Version";
-const QString	PluginConstants::PLUGIN_ACTIVATIONPOLICY = "Plugin-ActivationPolicy";
+const QString	ctkPluginConstants::PLUGIN_SYMBOLICNAME = "Plugin-SymbolicName";
+const QString ctkPluginConstants::PLUGIN_COPYRIGHT = "Plugin-Copyright";
+const QString ctkPluginConstants::PLUGIN_DESCRIPTION = "Plugin-Description";
+const QString ctkPluginConstants::PLUGIN_NAME = "Plugin-Name";
+const QString ctkPluginConstants::PLUGIN_LOCALIZATION = "Plugin-Localization";
+const QString ctkPluginConstants::PLUGIN_LOCALIZATION_DEFAULT_BASENAME = "CTK-INF/l10n/plugin";
+const QString ctkPluginConstants::REQUIRE_PLUGIN = "Require-Plugin";
+const QString ctkPluginConstants::PLUGIN_VERSION_ATTRIBUTE = "plugin-version";
+const QString	ctkPluginConstants::PLUGIN_VERSION = "Plugin-Version";
+const QString	ctkPluginConstants::PLUGIN_ACTIVATIONPOLICY = "Plugin-ActivationPolicy";
 
-const QString	PluginConstants::ACTIVATION_EAGER = "eager";
+const QString	ctkPluginConstants::ACTIVATION_EAGER = "eager";
 
-const QString PluginConstants::RESOLUTION_DIRECTIVE = "resolution";
-const QString PluginConstants::RESOLUTION_MANDATORY = "mandatory";
-const QString PluginConstants::RESOLUTION_OPTIONAL = "optional";
+const QString ctkPluginConstants::RESOLUTION_DIRECTIVE = "resolution";
+const QString ctkPluginConstants::RESOLUTION_MANDATORY = "mandatory";
+const QString ctkPluginConstants::RESOLUTION_OPTIONAL = "optional";
 
 
-const QString PluginConstants::OBJECTCLASS = "objectclass";
-const QString PluginConstants::SERVICE_ID = "service.id";
-const QString PluginConstants::SERVICE_RANKING = "service.ranking";
+const QString ctkPluginConstants::OBJECTCLASS = "objectclass";
+const QString ctkPluginConstants::SERVICE_ID = "service.id";
+const QString ctkPluginConstants::SERVICE_RANKING = "service.ranking";
 

+ 1 - 1
Libs/PluginFramework/ctkPluginConstants.h

@@ -27,7 +27,7 @@
 #include "CTKPluginFrameworkExport.h"
 
 
-struct CTK_PLUGINFW_EXPORT PluginConstants {
+struct CTK_PLUGINFW_EXPORT ctkPluginConstants {
 
   /**
    * Location identifier of the CTK <i>system plugin</i>, which is defined

+ 6 - 6
Libs/PluginFramework/ctkPluginContext.h

@@ -157,9 +157,9 @@
      * <li>The Framework adds the following service properties to the service
      * properties from the specified <code>ServiceProperties</code> (which may be
      * omitted): <br/>
-     * A property named {@link PluginConstants#SERVICE_ID} identifying the
+     * A property named {@link ctkPluginConstants#SERVICE_ID} identifying the
      * registration number of the service <br/>
-     * A property named {@link PluginConstants#OBJECTCLASS} containing all the
+     * A property named {@link ctkPluginConstants#OBJECTCLASS} containing all the
      * specified classes. <br/>
      * Properties with these names in the specified <code>ServiceProperties</code> will
      * be ignored.
@@ -172,12 +172,12 @@
      *
      * @param clazzes The class names under which the service can be located.
      *        The class names will be stored in the service's
-     *        properties under the key {@link PluginConstants#OBJECTCLASS}.
+     *        properties under the key {@link ctkPluginConstants#OBJECTCLASS}.
      * @param service The service object or a <code>ctkServiceFactory</code>
      *        object.
      * @param properties The properties for this service. The keys in the
      *        properties object must all be <code>QString</code> objects. See
-     *        {@link PluginConstants} for a list of standard service property keys.
+     *        {@link ctkPluginConstants} for a list of standard service property keys.
      *        Changes should not be made to this object after calling this
      *        method. To update the service's properties the
      *        {@link ctkServiceRegistration::setProperties} method must be called.
@@ -264,10 +264,10 @@
      * specified class.
      * <p>
      * If multiple such services exist, the service with the highest ranking (as
-     * specified in its {@link PluginConstants::SERVICE_RANKING} property) is returned.
+     * specified in its {@link ctkPluginConstants::SERVICE_RANKING} property) is returned.
      * <p>
      * If there is a tie in ranking, the service with the lowest service ID (as
-     * specified in its {@link PluginConstants::SERVICE_ID} property); that is, the
+     * specified in its {@link ctkPluginConstants::SERVICE_ID} property); that is, the
      * service that was registered first is returned.
      *
      * @param clazz The class name with which the service was registered.

+ 2 - 2
Libs/PluginFramework/ctkPluginDatabase.cpp

@@ -356,9 +356,9 @@ ctkPluginArchive* ctkPluginDatabase::insertPlugin(const QUrl& location, const QS
                                                pluginId);;
 
     statement = "UPDATE Plugins SET SymbolicName=?,Version=? WHERE ID=?";
-    QString versionString = archive->getAttribute(PluginConstants::PLUGIN_VERSION);
+    QString versionString = archive->getAttribute(ctkPluginConstants::PLUGIN_VERSION);
     bindValues.clear();
-    bindValues.append(archive->getAttribute(PluginConstants::PLUGIN_SYMBOLICNAME));
+    bindValues.append(archive->getAttribute(ctkPluginConstants::PLUGIN_SYMBOLICNAME));
     bindValues.append(versionString.isEmpty() ? "0.0.0" : versionString);
     bindValues.append(pluginId);
 

+ 2 - 2
Libs/PluginFramework/ctkPluginFramework.cpp

@@ -116,7 +116,7 @@
 
   QStringList ctkPluginFramework::getResourceList(const QString& path) const
   {
-    QString resourcePath = QString(":/") + PluginConstants::SYSTEM_PLUGIN_SYMBOLICNAME;
+    QString resourcePath = QString(":/") + ctkPluginConstants::SYSTEM_PLUGIN_SYMBOLICNAME;
     if (path.startsWith('/'))
       resourcePath += path;
     else
@@ -140,7 +140,7 @@
 
   QByteArray ctkPluginFramework::getResource(const QString& path) const
   {
-    QString resourcePath = QString(":/") + PluginConstants::SYSTEM_PLUGIN_SYMBOLICNAME;
+    QString resourcePath = QString(":/") + ctkPluginConstants::SYSTEM_PLUGIN_SYMBOLICNAME;
     if (path.startsWith('/'))
       resourcePath += path;
     else

+ 1 - 1
Libs/PluginFramework/ctkPluginFrameworkContext.cpp

@@ -169,7 +169,7 @@
           }
         }
 
-        if (!ok && pr->resolution == PluginConstants::RESOLUTION_MANDATORY)
+        if (!ok && pr->resolution == ctkPluginConstants::RESOLUTION_MANDATORY)
         {
           tempResolved.clear();
           qDebug() << "checkRequirePlugin: failed to satisfy:" << pr->name;

+ 1 - 1
Libs/PluginFramework/ctkPluginFrameworkFactory.h

@@ -50,7 +50,7 @@
      * the following properties:
      *
      * <p>
-     * <ul><li>PluginConstants::FRAMEWORK_STORAGE</li>
+     * <ul><li>ctkPluginConstants::FRAMEWORK_STORAGE</li>
      * </ul>
      *
      * @param initProps The plugin framework configuration properties.

+ 5 - 5
Libs/PluginFramework/ctkPluginFrameworkPrivate.cpp

@@ -28,14 +28,14 @@
 
 
   ctkPluginFrameworkPrivate::ctkPluginFrameworkPrivate(ctkPluginFramework& qq, ctkPluginFrameworkContext* fw)
-    : ctkPluginPrivate(qq, fw, 0, PluginConstants::SYSTEM_PLUGIN_LOCATION,
-                    PluginConstants::SYSTEM_PLUGIN_SYMBOLICNAME,
+    : ctkPluginPrivate(qq, fw, 0, ctkPluginConstants::SYSTEM_PLUGIN_LOCATION,
+                    ctkPluginConstants::SYSTEM_PLUGIN_SYMBOLICNAME,
                     // TODO: read version from the manifest resource
                     ctkVersion(0, 9, 0))
   {
-    systemHeaders.insert(PluginConstants::PLUGIN_SYMBOLICNAME, symbolicName);
-    systemHeaders.insert(PluginConstants::PLUGIN_NAME, location);
-    systemHeaders.insert(PluginConstants::PLUGIN_VERSION, version.toString());
+    systemHeaders.insert(ctkPluginConstants::PLUGIN_SYMBOLICNAME, symbolicName);
+    systemHeaders.insert(ctkPluginConstants::PLUGIN_NAME, location);
+    systemHeaders.insert(ctkPluginConstants::PLUGIN_VERSION, version.toString());
   }
 
   void ctkPluginFrameworkPrivate::init()

+ 9 - 9
Libs/PluginFramework/ctkPluginPrivate.cpp

@@ -47,15 +47,15 @@
     checkManifestHeaders();
 
     // fill require list
-    QString requireString = archive->getAttribute(PluginConstants::REQUIRE_PLUGIN);
-    QList<QMap<QString, QStringList> > requireList = ctkPluginFrameworkUtil::parseEntries(PluginConstants::REQUIRE_PLUGIN,
+    QString requireString = archive->getAttribute(ctkPluginConstants::REQUIRE_PLUGIN);
+    QList<QMap<QString, QStringList> > requireList = ctkPluginFrameworkUtil::parseEntries(ctkPluginConstants::REQUIRE_PLUGIN,
                                                                          requireString, true, true, false);
     QListIterator<QMap<QString, QStringList> > i(requireList);
     while (i.hasNext())
     {
       const QMap<QString, QStringList>& e = i.next();
-      const QStringList& res = e.value(PluginConstants::RESOLUTION_DIRECTIVE);
-      const QStringList& version = e.value(PluginConstants::PLUGIN_VERSION_ATTRIBUTE);
+      const QStringList& res = e.value(ctkPluginConstants::RESOLUTION_DIRECTIVE);
+      const QStringList& version = e.value(ctkPluginConstants::PLUGIN_VERSION_ATTRIBUTE);
       ctkRequirePlugin* rp = new ctkRequirePlugin(this, e.value("$key").front(),
                                             res.empty() ? QString() : res.front(),
                                             version.empty() ? QString() : version.front());
@@ -121,7 +121,7 @@
 
   void ctkPluginPrivate::checkManifestHeaders()
   {
-    symbolicName = archive->getAttribute(PluginConstants::PLUGIN_SYMBOLICNAME);
+    symbolicName = archive->getAttribute(ctkPluginConstants::PLUGIN_SYMBOLICNAME);
 
     if (symbolicName.isEmpty())
     {
@@ -129,7 +129,7 @@
                                            qPrintable(location));
     }
 
-    QString mpv = archive->getAttribute(PluginConstants::PLUGIN_VERSION);
+    QString mpv = archive->getAttribute(ctkPluginConstants::PLUGIN_VERSION);
     if (!mpv.isEmpty())
     {
       try
@@ -139,12 +139,12 @@
       catch (const std::exception& e)
       {
         throw std::invalid_argument(std::string("ctkPlugin does not specify a valid ") +
-                                    qPrintable(PluginConstants::PLUGIN_VERSION) + " header. Got exception: " + e.what());
+                                    qPrintable(ctkPluginConstants::PLUGIN_VERSION) + " header. Got exception: " + e.what());
       }
     }
 
-    QString ap = archive->getAttribute(PluginConstants::PLUGIN_ACTIVATIONPOLICY);
-    if (PluginConstants::ACTIVATION_EAGER == ap)
+    QString ap = archive->getAttribute(ctkPluginConstants::PLUGIN_ACTIVATIONPOLICY);
+    if (ctkPluginConstants::ACTIVATION_EAGER == ap)
     {
       eagerActivation = true;
     }

+ 9 - 9
Libs/PluginFramework/ctkRequirePlugin.cpp

@@ -29,22 +29,22 @@
                 const QString& name, const QString& res,
                 const QString& range)
                   : name(name),
-                  resolution(res.isEmpty() ? PluginConstants::RESOLUTION_MANDATORY : res),
+                  resolution(res.isEmpty() ? ctkPluginConstants::RESOLUTION_MANDATORY : res),
                   pluginRange(range.isEmpty() ? ctkVersionRange::defaultVersionRange() : range)
   {
 
-    if (resolution != PluginConstants::RESOLUTION_MANDATORY &&
-        resolution != PluginConstants::RESOLUTION_OPTIONAL )
+    if (resolution != ctkPluginConstants::RESOLUTION_MANDATORY &&
+        resolution != ctkPluginConstants::RESOLUTION_OPTIONAL )
     {
       QString what = QString("Invalid directive : '")
-                     + PluginConstants::RESOLUTION_DIRECTIVE + ":=" + this->resolution
+                     + ctkPluginConstants::RESOLUTION_DIRECTIVE + ":=" + this->resolution
                      + "' in manifest header '"
-                     + PluginConstants::REQUIRE_PLUGIN + ": " + this->name
+                     + ctkPluginConstants::REQUIRE_PLUGIN + ": " + this->name
                      + "' of plugin with id " + requestor->id
                      + " (" + requestor->symbolicName + ")"
                      + ". The value must be either '"
-                     + PluginConstants::RESOLUTION_MANDATORY + "' or '"
-                     + PluginConstants::RESOLUTION_OPTIONAL  + "'.";
+                     + ctkPluginConstants::RESOLUTION_MANDATORY + "' or '"
+                     + ctkPluginConstants::RESOLUTION_OPTIONAL  + "'.";
       throw std::invalid_argument(what.toStdString());
       }
 
@@ -53,8 +53,8 @@
 
   bool ctkRequirePlugin::overlap(const ctkRequirePlugin& rp) const
   {
-    if (resolution == PluginConstants::RESOLUTION_MANDATORY &&
-        rp.resolution != PluginConstants::RESOLUTION_MANDATORY)
+    if (resolution == ctkPluginConstants::RESOLUTION_MANDATORY &&
+        rp.resolution != ctkPluginConstants::RESOLUTION_MANDATORY)
     {
       return false;
     }

+ 4 - 4
Libs/PluginFramework/ctkServiceReference.cpp

@@ -89,8 +89,8 @@
                                   "instances.");
     }
 
-    int r1 = getProperty(PluginConstants::SERVICE_RANKING).toInt();
-    int r2 = reference.getProperty(PluginConstants::SERVICE_RANKING).toInt();
+    int r1 = getProperty(ctkPluginConstants::SERVICE_RANKING).toInt();
+    int r2 = reference.getProperty(ctkPluginConstants::SERVICE_RANKING).toInt();
 
     if (r1 != r2)
     {
@@ -99,8 +99,8 @@
     }
     else
     {
-      qlonglong id1 = getProperty(PluginConstants::SERVICE_ID).toLongLong();
-      qlonglong id2 = reference.getProperty(PluginConstants::SERVICE_ID).toLongLong();
+      qlonglong id1 = getProperty(ctkPluginConstants::SERVICE_ID).toLongLong();
+      qlonglong id2 = reference.getProperty(ctkPluginConstants::SERVICE_ID).toLongLong();
 
       // otherwise compare using IDs,
       // is less than if it has a higher ID.

+ 4 - 4
Libs/PluginFramework/ctkServiceReference.h

@@ -142,16 +142,16 @@
      *
      * <p>
      * If this <code>ctkServiceReference</code> and the specified
-     * <code>ctkServiceReference</code> have the same {@link PluginConstants::SERVICE_ID
+     * <code>ctkServiceReference</code> have the same {@link ctkPluginConstants::SERVICE_ID
      * service id} they are equal. This <code>ctkServiceReference</code> is less
      * than the specified <code>ctkServiceReference</code> if it has a lower
-     * {@link PluginConstants::SERVICE_RANKING service ranking} and greater if it has a
+     * {@link ctkPluginConstants::SERVICE_RANKING service ranking} and greater if it has a
      * higher service ranking. Otherwise, if this <code>ctkServiceReference</code>
      * and the specified <code>ctkServiceReference</code> have the same
-     * {@link PluginConstants::SERVICE_RANKING service ranking}, this
+     * {@link ctkPluginConstants::SERVICE_RANKING service ranking}, this
      * <code>ctkServiceReference</code> is less than the specified
      * <code>ctkServiceReference</code> if it has a higher
-     * {@link PluginConstants::SERVICE_ID service id} and greater if it has a lower
+     * {@link ctkPluginConstants::SERVICE_ID service id} and greater if it has a lower
      * service id.
      *
      * @param reference The <code>ctkServiceReference</code> to be compared.

+ 1 - 1
Libs/PluginFramework/ctkServiceReferencePrivate.cpp

@@ -48,7 +48,7 @@
         if (count == 0)
         {
           QStringList classes =
-              registration->properties.value(PluginConstants::OBJECTCLASS).toStringList();
+              registration->properties.value(ctkPluginConstants::OBJECTCLASS).toStringList();
           registration->dependents[plugin] = 1;
           if (ctkServiceFactory* serviceFactory = qobject_cast<ctkServiceFactory*>(registration->getService()))
           {

+ 2 - 2
Libs/PluginFramework/ctkServiceRegistration.h

@@ -70,7 +70,7 @@
      * Updates the properties associated with a service.
      *
      * <p>
-     * The {@link PluginConstants#OBJECTCLASS} and {@link PluginConstants#SERVICE_ID} keys
+     * The {@link ctkPluginConstants#OBJECTCLASS} and {@link ctkPluginConstants#SERVICE_ID} keys
      * cannot be modified by this method. These values are set by the Framework
      * when the service is registered in the environment.
      *
@@ -81,7 +81,7 @@
      * <li>A service event of type {@link ServiceEvent#MODIFIED} is fired.
      * </ol>
      *
-     * @param properties The properties for this service. See {@link PluginConstants}
+     * @param properties The properties for this service. See {@link ctkPluginConstants}
      *        for a list of standard service property keys. Changes should not
      *        be made to this object after calling this method. To update the
      *        service's properties this method should be called again.

+ 5 - 5
Libs/PluginFramework/ctkServices.cpp

@@ -73,10 +73,10 @@
 
     if (!classes.isEmpty())
     {
-      props.insert(PluginConstants::OBJECTCLASS, classes);
+      props.insert(ctkPluginConstants::OBJECTCLASS, classes);
     }
 
-    props.insert(PluginConstants::SERVICE_ID, sid != -1 ? sid : nextServiceID++);
+    props.insert(ctkPluginConstants::SERVICE_ID, sid != -1 ? sid : nextServiceID++);
 
     return props;
   }
@@ -192,7 +192,7 @@ void ctkServices::registerService(ctkPluginPrivate* plugin, QByteArray serviceDe
     while (keyIt.hasNext())
     {
       QString key = keyIt.next();
-      if (key == PluginConstants::OBJECTCLASS)
+      if (key == ctkPluginConstants::OBJECTCLASS)
       {
         classAttrFound = true;
         classes << descr.customAttribute(key);
@@ -206,7 +206,7 @@ void ctkServices::registerService(ctkPluginPrivate* plugin, QByteArray serviceDe
     if (!classAttrFound)
     {
       throw std::invalid_argument(std::string("The custom attribute \"") +
-                                  PluginConstants::OBJECTCLASS.toStdString() +
+                                  ctkPluginConstants::OBJECTCLASS.toStdString() +
                                   "\" is missing in the interface description of \"" +
                                   descr.interfaceName().toStdString());
     }
@@ -395,7 +395,7 @@ void ctkServices::removeServiceRegistration(ctkServiceRegistration* sr)
 {
   QMutexLocker lock(&mutex);
 
-  QStringList classes = sr->d_func()->properties.value(PluginConstants::OBJECTCLASS).toStringList();
+  QStringList classes = sr->d_func()->properties.value(ctkPluginConstants::OBJECTCLASS).toStringList();
   services.remove(sr);
   for (QStringListIterator i(classes); i.hasNext(); )
   {