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

DEBUG variable renamed to DEBUG_FLAG

Signed-off-by: Rostislav Khlebnikov <r.khlebnikov@gmail.com>
Rostislav Khlebnikov 9 éve
szülő
commit
c76af6a4ac

+ 12 - 12
Libs/PluginFramework/ctkPluginAbstractTracked.tpp

@@ -26,7 +26,7 @@
 
 //----------------------------------------------------------------------------
 template<class S, class T, class R>
-const bool ctkPluginAbstractTracked<S,T,R>::DEBUG = false;
+const bool ctkPluginAbstractTracked<S,T,R>::DEBUG_FLAG = false;
 
 //----------------------------------------------------------------------------
 template<class S, class T, class R>
@@ -62,7 +62,7 @@ void ctkPluginAbstractTracked<S,T,R>::setInitial(const QList<S>& list)
 {
   foreach (S item, list)
   {
-    if (DEBUG)
+    if (DEBUG_FLAG)
     {
       qDebug() << "ctkPluginAbstractTracked::setInitial:" << item;
     }
@@ -94,7 +94,7 @@ void ctkPluginAbstractTracked<S,T,R>::trackInitial()
       if (tracked.value(item))
       {
         /* if we are already tracking this item */
-        if (DEBUG)
+        if (DEBUG_FLAG)
         {
           qDebug() << "ctkPluginAbstractTracked::trackInitial[already tracked]: " << item;
         }
@@ -105,7 +105,7 @@ void ctkPluginAbstractTracked<S,T,R>::trackInitial()
         /*
          * if this item is already in the process of being added.
          */
-        if (DEBUG)
+        if (DEBUG_FLAG)
         {
           qDebug() << "ctkPluginAbstractTracked::trackInitial[already adding]: " << item;
         }
@@ -113,7 +113,7 @@ void ctkPluginAbstractTracked<S,T,R>::trackInitial()
       }
       adding.push_back(item);
     }
-    if (DEBUG)
+    if (DEBUG_FLAG)
     {
       qDebug() << "ctkPluginAbstractTracked::trackInitial: " << item;
     }
@@ -150,7 +150,7 @@ void ctkPluginAbstractTracked<S,T,R>::track(S item, R related)
       if (adding.contains(item))
       {
         /* if this item is already in the process of being added. */
-        if (DEBUG)
+        if (DEBUG_FLAG)
         {
           qDebug() << "ctkPluginAbstractTracked::track[already adding]: " << item;
         }
@@ -160,7 +160,7 @@ void ctkPluginAbstractTracked<S,T,R>::track(S item, R related)
     }
     else
     { /* we are currently tracking this item */
-      if (DEBUG)
+      if (DEBUG_FLAG)
       {
         qDebug() << "ctkPluginAbstractTracked::track[modified]: " << item;
       }
@@ -194,7 +194,7 @@ void ctkPluginAbstractTracked<S,T,R>::untrack(S item, R related)
     { /* if this item is already in the list
        * of initial references to process
        */
-      if (DEBUG)
+      if (DEBUG_FLAG)
       {
         qDebug() << "ctkPluginAbstractTracked::untrack[removed from initial]: " << item;
       }
@@ -207,7 +207,7 @@ void ctkPluginAbstractTracked<S,T,R>::untrack(S item, R related)
     { /* if the item is in the process of
        * being added
        */
-      if (DEBUG)
+      if (DEBUG_FLAG)
       {
         qDebug() << "ctkPluginAbstractTracked::untrack[being added]: " << item;
       }
@@ -226,7 +226,7 @@ void ctkPluginAbstractTracked<S,T,R>::untrack(S item, R related)
     }
     modified(); /* increment modification count */
   }
-  if (DEBUG)
+  if (DEBUG_FLAG)
   {
     qDebug() << "ctkPluginAbstractTracked::untrack[removed]: " << item;
   }
@@ -326,7 +326,7 @@ bool ctkPluginAbstractTracked<S,T,R>::customizerAddingFinal(S item, const T& cus
 template<class S, class T, class R>
 void ctkPluginAbstractTracked<S,T,R>::trackAdding(S item, R related)
 {
-  if (DEBUG)
+  if (DEBUG_FLAG)
   {
     qDebug() << "ctkPluginAbstractTracked::trackAdding:" << item;
   }
@@ -353,7 +353,7 @@ void ctkPluginAbstractTracked<S,T,R>::trackAdding(S item, R related)
    */
   if (becameUntracked && object)
   {
-    if (DEBUG)
+    if (DEBUG_FLAG)
     {
       qDebug() << "ctkPluginAbstractTracked::trackAdding[removed]: " << item;
     }

+ 1 - 1
Libs/PluginFramework/ctkPluginAbstractTracked_p.h

@@ -51,7 +51,7 @@ class ctkPluginAbstractTracked : public QMutex
 public:
 
   /* set this to true to compile in debug messages */
-  static const bool DEBUG; // = false;
+  static const bool DEBUG_FLAG; // = false;
 
   /**
    * ctkPluginAbstractTracked constructor.

+ 2 - 2
Libs/PluginFramework/ctkPluginTracker.tpp

@@ -55,7 +55,7 @@ void ctkPluginTracker<T>::open()
       return;
     }
 
-    if (d->DEBUG)
+    if (d->DEBUG_FLAG)
     {
       qDebug() << "ctkPluginTracker<T>::open";
     }
@@ -100,7 +100,7 @@ void ctkPluginTracker<T>::close()
       return;
     }
 
-    if (d->DEBUG)
+    if (d->DEBUG_FLAG)
     {
       qDebug() << "ctkPluginTracker<T>::close";
     }

+ 1 - 1
Libs/PluginFramework/ctkPluginTracker_p.h

@@ -51,7 +51,7 @@ public:
   QSharedPointer<ctkTrackedPlugin<T> > tracked() const;
 
   /* set this to true to compile in debug messages */
-  static const bool DEBUG; //	= false;
+  static const bool DEBUG_FLAG; //	= false;
 
   /**
    * The Bundle Context used by this <code>ctkPluginTracker</code>.

+ 1 - 1
Libs/PluginFramework/ctkPluginTracker_p.tpp

@@ -24,7 +24,7 @@
 
 //----------------------------------------------------------------------------
 template<class T>
-const bool ctkPluginTrackerPrivate<T>::DEBUG = false;
+const bool ctkPluginTrackerPrivate<T>::DEBUG_FLAG = false;
 
 //----------------------------------------------------------------------------
 template<class T>

+ 7 - 7
Libs/PluginFramework/ctkServiceTracker.tpp

@@ -85,7 +85,7 @@ void ctkServiceTracker<S,T>::open()
       return;
     }
 
-    if (d->DEBUG)
+    if (d->DEBUG_FLAG)
     {
       qDebug() << "ctkServiceTracker<S,T>::open: " << d->filter;
     }
@@ -141,7 +141,7 @@ void ctkServiceTracker<S,T>::close()
     {
       return;
     }
-    if (d->DEBUG)
+    if (d->DEBUG_FLAG)
     {
       qDebug() << "ctkServiceTracker<S,T>::close:" << d->filter;
     }
@@ -167,7 +167,7 @@ void ctkServiceTracker<S,T>::close()
     outgoing->untrack(ref, ctkServiceEvent());
   }
 
-  if (d->DEBUG)
+  if (d->DEBUG_FLAG)
   {
     QMutexLocker lock(&d->mutex);
     if ((d->cachedReference.getPlugin().isNull()) && (d->cachedService == 0))
@@ -235,14 +235,14 @@ ctkServiceReference ctkServiceTracker<S,T>::getServiceReference() const
   }
   if (!reference.getPlugin().isNull())
   {
-    if (d->DEBUG)
+    if (d->DEBUG_FLAG)
     {
       qDebug() << "ctkServiceTracker<S,T>::getServiceReference[cached]:"
                    << d->filter;
     }
     return reference;
   }
-  if (d->DEBUG)
+  if (d->DEBUG_FLAG)
   {
     qDebug() << "ctkServiceTracker<S,T>::getServiceReference:" << d->filter;
   }
@@ -351,14 +351,14 @@ T ctkServiceTracker<S,T>::getService() const
   T service = d->cachedService;
   if (service != 0)
   {
-    if (d->DEBUG)
+    if (d->DEBUG_FLAG)
     {
       qDebug() << "ctkServiceTracker<S,T>::getService[cached]:"
                << d->filter;
     }
     return service;
   }
-  if (d->DEBUG)
+  if (d->DEBUG_FLAG)
   {
     qDebug() << "ctkServiceTracker<S,T>::getService:" << d->filter;
   }

+ 1 - 1
Libs/PluginFramework/ctkServiceTracker_p.h

@@ -72,7 +72,7 @@ public:
   QList<ctkServiceReference> getServiceReferences_unlocked(ctkTrackedService<S,T>* t) const;
 
   /* set this to true to compile in debug messages */
-  static const bool	DEBUG; //	= false;
+  static const bool	DEBUG_FLAG; //	= false;
 
   /**
    * The Plugin Context used by this <code>ctkServiceTracker</code>.

+ 2 - 2
Libs/PluginFramework/ctkServiceTracker_p.tpp

@@ -28,7 +28,7 @@
 
 //----------------------------------------------------------------------------
 template<class S, class T>
-const bool ctkServiceTrackerPrivate<S,T>::DEBUG = false;
+const bool ctkServiceTrackerPrivate<S,T>::DEBUG_FLAG = false;
 
 //----------------------------------------------------------------------------
 template<class S, class T>
@@ -142,7 +142,7 @@ void ctkServiceTrackerPrivate<S,T>::modified()
 {
   cachedReference = 0; /* clear cached value */
   cachedService = 0; /* clear cached value */
-  if (DEBUG)
+  if (DEBUG_FLAG)
   {
     qDebug() << "ctkServiceTracker::modified:" << filter;
   }

+ 1 - 1
Libs/PluginFramework/ctkTrackedPlugin.tpp

@@ -43,7 +43,7 @@ void ctkTrackedPlugin<T>::pluginChanged(const ctkPluginEvent& event)
 
   QSharedPointer<ctkPlugin> plugin = event.getPlugin();
   ctkPlugin::State state = plugin->getState();
-  if (pluginTracker->d_func()->DEBUG)
+  if (pluginTracker->d_func()->DEBUG_FLAG)
   {
     qDebug() << "ctkTrackedPlugin<T>::pluginChanged[" << state << "]: " << *plugin;
   }

+ 1 - 1
Libs/PluginFramework/ctkTrackedService.tpp

@@ -44,7 +44,7 @@ void ctkTrackedService<S,T>::serviceChanged(const ctkServiceEvent& event)
   }
 
   ctkServiceReference reference = event.getServiceReference();
-  if (serviceTracker->d_func()->DEBUG)
+  if (serviceTracker->d_func()->DEBUG_FLAG)
   {
     qDebug() << "ctkTrackedService::serviceChanged["
         << event.getType() << "]: " << reference;

+ 3 - 3
Libs/PluginFramework/service/debug/ctkDebugOptionsListener.h

@@ -42,7 +42,7 @@ struct ctkDebugOptions;
  * <pre>
  * class Activator : ctkPluginActivator, ctkDebugOptionsListener
  * {
- *   static bool DEBUG = false;
+ *   static bool DEBUG_FLAG = false;
  *
  *   void start(ctkPluginContext* context)
  *   {
@@ -53,12 +53,12 @@ struct ctkDebugOptions;
  *
  *   void optionsChanged(const ctkDebugOptions& options)
  *   {
- *     DEBUG = options->getBooleanOption("com.mycompany.mybundle/debug", false);
+ *     DEBUG_FLAG = options->getBooleanOption("com.mycompany.mybundle/debug", false);
  *   }
  *
  *   void doSomeWork()
  *   {
- *     if (DEBUG) BERRY_INFO << "foo";
+ *     if (DEBUG_FLAG) BERRY_INFO << "foo";
  *   }
  *   ...
  * }