On 03/05/2013 12:16 PM, hey68 you wrote:
Ok - I think I need to use a BLooper object.
Yes. You cannot create your own BApplication, since Qt already creates one internally and only one BApplication instance is allowed. For getting BRoster notifications a BLooper is sufficient anyway. You could probably even use a BHandler and add that handler to the BApplication Qt creates.
On Tue, Mar 5, 2013 at 12:30 PM, hey68 you <hey68you@xxxxxxxxx <mailto:hey68you@xxxxxxxxx>> wrote: I'm experimenting with another version of my Dock app that will use Qt-QML animations for the icons, etc. (So basically it's a Qt app but I want it to have the back-end of real BApplication)... If you don't want to shot me yet, then please read on: However this app will need to connect to be_roster, even though the app is not a BApplication (AFAIU). So far, I am able to launch apps when an item is clicked, by creating my own instance of a BRoster object as follows: BRoster *be_roster = new BRoster(); be_roster->Launch("application/x-vnd.Haiku-StyledEdit");
That is not a good name for a locale variable, since it's the name of the global variable provided by libbe (the "be_*" namespace is reserved for use by the system API). That aside, you can create the BRoster object on the stack.
CU, IngoPS: Please don't top-post. This makes the mail so much more annoying to read and reply to.