Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / QtResource / QtResource_Factory.cpp
blob237cbfcc168cd05f4a6048a3121184db95944cc9
1 #include "tao/QtResource/QtResource_Factory.h"
2 #include "tao/debug.h"
3 #include "ace/QtReactor/QtReactor.h"
5 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
7 namespace TAO
9 QtResource_Factory::QtResource_Factory (QApplication *qapp)
10 : reactor_impl_ (0)
11 , qapp_ (qapp)
15 ACE_Reactor_Impl *
16 QtResource_Factory::reactor_impl ()
17 { // synchronized by external locks
18 if (this->qapp_ == 0)
20 TAOLIB_ERROR ((LM_ERROR,
21 "TAO (%P|%t) - QApplication is undefined.",
22 " Cannot create ACE_QtReactor\n"));
23 return 0;
26 if (!this->reactor_impl_)
28 ACE_NEW_RETURN (this->reactor_impl_,
29 ACE_QtReactor (qapp_),
30 0);
32 if (TAO_debug_level > 0)
33 TAOLIB_DEBUG ((LM_DEBUG,
34 "TAO (%P|%t) - ACE_QtReactor created\n"));
37 return this->reactor_impl_;
41 TAO_END_VERSIONED_NAMESPACE_DECL