title: QMake moc files confused by namespaces
body: <p>I have a file that looks like:</p>
  
  <pre><code>#ifndef ENGINE_PLATFORM_AREAEDITOR_H
  #define ENGINE_PLATFORM_AREAEDITOR_H
  
  #include &lt;QWidget&gt;
  #include "../Widgets/QtSfmlWidget.h"
  
  namespace Engine { namespace World { class Area; } }
  
  //This tell's Qt's qmake to ignore the code between MOC_SKIP_BEGIN and MOC_SKIP_END
  // MOC_SKIP_BEGIN
  #include "Engine/World/Area.h"
  // MOC_SKIP_END
  
  namespace Ui {
  class AreaEditor;
  }
  
  class AreaEditor : public QWidget
  {
      Q_OBJECT
  
  public:
      Engine::World::Area area;
  
  public:
      explicit AreaEditor(QWidget *parent = 0);
      ~AreaEditor();
  
      //...stuff....
  
  private slots:
      void on_markerTextEdit_textChanged();
  
      void onDrawAreaScreen(sf::RenderTarget &amp;renderTarget);
      void onDrawAreaResized(const WindowSize &amp;windowSize);
  
  private:
      Ui::AreaEditor *ui;
  
      //...stuff....
  };
  
  #endif //ENGINE_PLATFORM_AREAEDITOR_H
  </code></pre>
  
  <p>However, when Qt is generating the _moc file, it incorrectly thinks 'AreaEditor' is in the namespace 'Engine', which then causes the compile to fail.</p>
  
  <p>Here's an example snippet of the moc file that QMake is generating:</p>
  
  <pre><code>      ______/---------&lt;-&lt; Wrong       
       V      V
  void Engine::AreaEditor::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
  {
      if (_c == QMetaObject::InvokeMetaMethod) {
          AreaEditor *_t = static_cast&lt;AreaEditor *&gt;(_o);
          switch (_id) {
          case 0: _t-&gt;on_markerTextEdit_textChanged(); break;
          case 1: _t-&gt;onDrawAreaScreen((*reinterpret_cast&lt; sf::RenderTarget(*)&gt;(_a[1]))); break;
          case 2: _t-&gt;onDrawAreaResized((*reinterpret_cast&lt; const WindowSize(*)&gt;(_a[1]))); break;
          default: ;
          }
      }
  }
  </code></pre>
  
  <p>Here's what it <em>should</em> be:</p>
  
  <pre><code>void AreaEditor::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
  </code></pre>
  
  <p>The header file "Engine/World/Area.h" has a class called 'Area' that is in a namespace 'Engine' (actually, it's in 'Engine::World::", two nested namespaces). It seems like this is confusing QMake in some way!</p>
  
  <p>If I remove the #include, commenting it out, everything compiles fine (except I have to pre-declare 'Area', and then can only use it as a pointer or a reference in the class).</p>
  
  <p>So I tried wrapping the #include in a "MOC_SKIP_BEGIN", which I can find seemingly archaic references to online, hoping QMake will skip that header. Nope, still fails to compile.</p>
  
  <p>Is there a way I can get this to compile while still being able to include the header I want to include?</p>