Core::initialize

Andreas Pakulat apaku at gmx.de
Sun Jul 12 09:19:31 UTC 2009


On 12.07.09 00:12:01, Ramon Zarazua wrote:
> >Uhm, that won't work. You cannot create a gui-core in a non-gui
> >application. Either you change to use QTEST_KDEMAIN(TestCppCodegen)
> >or you use KDevelop::Core::NoUi for the core. (Actually I'm not sure
> >wether you can have a non-gui QApplication/KApplication even with
> >Core::NoUi).
> >
> >Andreas
> 
> Whoops, sorry about that one, that was part of the testr i did to see if it 
> would work like that, I am actually using KDevelop::Core::NoUi.
> 
> Then I discovered another crash on cpplanguagesupport.cpp:169. Inside the call 
> to setXMLFile, a call to KGlobal::mainComponent fails.

That fails if there's no proper KDE initialization (KApplication) being
done, i.e. usage of QTEST_MAIN instead of QTEST_KDEMAIN (AFAIK).

> I also haven't figured 
> out why, from what I see in the documentation, "There is always at least one 
> instance of a component in one application (in most cases the application 
> itself).", by this I think it means the app, which I saw was instantiated by 
> QTEST_KDEMAIN.

Yeap, if that doesn't work anymore that would be a problem in kdelibs
we should find out and report.
 
> While I discover what the hell is going on, I have put tests before the calls 
> that crash, so that it won't execute them if KDevelop::Core::NoUi is 
> specified(this won't be commited, it is just so that I can continue with the 
> actual test code).
> Anyone else have any other ideas? It is quite obvious something is missing as 
> other tests and tools can call Core::initialize(KDevelop::NoUi) without any 
> problems, but I still cannot find what that is.

I'll try to look closer into your patch later today.

Andreas

-- 
Among the lucky, you are the chosen one.




More information about the KDevelop-devel mailing list