Good evening
mitk::BaseApplication can't set OrganizationName if getQApplication will be 
used before run()
It's very complicated behaviour but I will try to explain how to reproduce it:
To use QtSingleApplication I set myApp.setSingleMode(true); this way it will 
create QtSingleApplication but there actually more things that I wanted to do 
with it: I've added methods alike isRunning and sendMessage - and I need to use 
it before qApp will be created because if qApp will be created I actually will 
not even be able to get in there...
So if I call those methods by adding methods to BaseApplication alike:
void BaseApplication::sendMessage(const QByteArray msg){  
QmitkSingleApplication* qCoreApp =    
dynamic_cast<QmitkSingleApplication*>(this->getQApplication());  if (qCoreApp 
!= nullptr)  {    qCoreApp->sendMessage(msg);  }}
then qCoreApp is creating and when it does myApp.run doesn't have qApp on 
initialize stage and then when initializeQt is called it gets out with : if 
(qApp) return;
then my application ignore organization name and just creates it's folder in 
AppData/local which breaks other logics...
How to deal with mitk::BaseApplication to be able to use isRunning and 
sendMessage QtSingleApplication methods?
Thank you.                                        
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to