title: Error: method was not declared in this scope (but it is included)
body: <p>I have two folders, f1 and f2, and they are on same level (have same folder for parent). In f1 I have source code of my project, and in f2 I have unit tests. </p>
  
  <p>The problem occurs when I try to include file from my project into unit test class. I just get this:</p>
  
  <pre><code>natty:/tmp/test/f2$ qmake-qt4 .
  natty:/tmp/test/f2$ make
  g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include/qt4/QtTest -I../f1 -I. -o main.o main.cpp
  g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include/qt4/QtTest -I../f1 -I. -o tcommon.o tcommon.cpp
  tcommon.cpp: In member function ‘void tcommon::tCalculateMD5_str()’:
  tcommon.cpp:21:50: error: ‘CalculateMD5’ was not declared in this scope
  tcommon.cpp: In member function ‘void tcommon::tCalculateMD5_uint()’:
  tcommon.cpp:43:50: error: ‘CalculateMD5’ was not declared in this scope
  make: *** [tcommon.o] Error 1
  </code></pre>
  
  <p>What is going on? The code in relevant files is, <code>test/f2/tcommon.cpp</code>:</p>
  
  <pre><code>#include "tcommon.h"
  #include &lt;common.h&gt;
  
  // ...
  
  void tcommon::tCalculateMD5_str()
  {
      QFETCH(QString, string);
      QFETCH(QString, result);
  
      // THIS IS LINE 21 &lt;-----------------------------------------------
      QCOMPARE(CalculateMD5(string), result);
  }
  // ...
  </code></pre>
  
  <p>And here is <code>common.h</code> from <code>test/f1/common.h</code> (the include is found just fine):</p>
  
  <pre><code>#ifndef COMMON_H
  #define COMMON_H
  
  #include &lt;QtCore&gt;
  
  QString CalculateMD5(uint number);
  QString CalculateMD5(QString str);
  
  #endif // COMMON_H
  </code></pre>
  
  <p>Here is project that won't compile (3 kb):
  <a href="http://www.xx77abs.com/test2.rar" rel="nofollow">http://www.xx77abs.com/test2.rar</a></p>