Version: 4.2.1 (using KDE 4.6.2) OS: Linux If you include a header within a namespace, the semantic analyzer will still think the included functions/classes/variables are visible at global namespace scope. If you write mynamespace::myIncludedWhatever, the semantic analyzer will not find the function/class/variable. Reproducible: Always Steps to Reproduce: -------------- someheader.h -------------- namespace test { #include "someheader.h" } int main(int argc, char **argv) { test::A a; a.foo(); test::A::bar(); return 0; } -------------- main.cpp -------------- namespace test { #include "someheader.h" } int main(int argc, char **argv) { test::A a; a.foo(); test::A::bar(); return 0; } Actual Results: Pressing ctrl+space on a.foo() will not give any syntax completion hints, test::A::bar() will get underlined with the semantic analyzer reporting that the declaration was not found. Expected Results: Should work OS: Linux (x86_64) release 2.6.38.4-20.fc15.x86_64 Compiler: gcc kdevplatform-libs-1.2.2-1.fc15.x86_64 kdevplatform-1.2.2-1.fc15.x86_64 kdevelop-4.2.2-1.fc15.x86_64 kdevelop-libs-4.2.2-1.fc15.x86_64 The situation where I encounter this situation a lot is with the Eigen linear algebra library.
... Copy paste error, -------------- someheader.h -------------- #ifndef __SOMEHEADER_H__ #define __SOMEHEADER_H__ #include <iostream> class A { public: void foo(){ std::cout<<"foo\n"; } static void bar(){ std::cout<<"bar\n"; } }; #endif
*** This bug has been marked as a duplicate of bug 217180 ***