title: Disable qDebug output locally with a macro
body: <p>I used qDebug all over the code. Now I would like to limit its output by translation units, defining a separate macro to enable/disable qDebug output in a translation unit:</p>
  
  <p>test.pro:</p>
  
  <pre><code>DEFINES += NO_DEBUG_ONE
  </code></pre>
  
  <p>testone.cpp:</p>
  
  <pre><code>#ifdef NO_DEBUG_ONE
  #define QT_NO_DEBUG_OUTPUT
  #endif
  </code></pre>
  
  <p>testtwo.cpp:</p>
  
  <pre><code>#ifdef NO_DEBUG_TWO
  #define QT_NO_DEBUG_OUTPUT
  #endif
  </code></pre>
  
  <p>So, setting macros like this I expected to get qDebug output only in testtwo.cpp, but I see the qDebug messages from both translation units.</p>
  
  <p>What am I missing here and how to solve it?</p>