* Don't uninitialized be_app_messenger in the destructor.
* Fixed missing variable initialization in GetSupportedSuites(). * InitData(): Don't post B_ARGV_RECEIVED to ourselfs when pre-registered. * InitData(): Added create_app_meta_mime(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1411 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0cf8481dc7
commit
ad4fdf8d15
@ -217,7 +217,8 @@ BApplication::~BApplication()
|
|||||||
be_roster->RemoveApp(Team());
|
be_roster->RemoveApp(Team());
|
||||||
// uninitialize be_app and be_app_messenger
|
// uninitialize be_app and be_app_messenger
|
||||||
be_app = NULL;
|
be_app = NULL;
|
||||||
be_app_messenger = BMessenger();
|
// R5 doesn't uninitialize be_app_messenger.
|
||||||
|
// be_app_messenger = BMessenger();
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
BApplication::BApplication(BMessage* data)
|
BApplication::BApplication(BMessage* data)
|
||||||
@ -518,7 +519,7 @@ void BApplication::SetPulseRate(bigtime_t rate)
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
status_t BApplication::GetSupportedSuites(BMessage* data)
|
status_t BApplication::GetSupportedSuites(BMessage* data)
|
||||||
{
|
{
|
||||||
status_t err;
|
status_t err = B_OK;
|
||||||
if (!data)
|
if (!data)
|
||||||
{
|
{
|
||||||
err = B_BAD_VALUE;
|
err = B_BAD_VALUE;
|
||||||
@ -654,15 +655,6 @@ void BApplication::InitData(const char* signature, status_t* error)
|
|||||||
fMsgPort = appInfo.port;
|
fMsgPort = appInfo.port;
|
||||||
} else
|
} else
|
||||||
appInfo.port = fMsgPort;
|
appInfo.port = fMsgPort;
|
||||||
// Create a B_ARGV_RECEIVED message and send it to ourselves.
|
|
||||||
// Do that even, if we are B_ARGV_ONLY.
|
|
||||||
// TODO: When BLooper::AddMessage() is done, use that instead of
|
|
||||||
// PostMessage().
|
|
||||||
if (__libc_argc > 1) {
|
|
||||||
BMessage argvMessage(B_ARGV_RECEIVED);
|
|
||||||
do_argv(&argvMessage);
|
|
||||||
PostMessage(&argvMessage, this);
|
|
||||||
}
|
|
||||||
// complete the registration
|
// complete the registration
|
||||||
fInitError = be_roster->CompleteRegistration(team, thread,
|
fInitError = be_roster->CompleteRegistration(team, thread,
|
||||||
appInfo.port);
|
appInfo.port);
|
||||||
@ -720,7 +712,12 @@ void BApplication::InitData(const char* signature, status_t* error)
|
|||||||
// set the BHandler's name
|
// set the BHandler's name
|
||||||
if (fInitError == B_OK)
|
if (fInitError == B_OK)
|
||||||
SetName(ref.name);
|
SetName(ref.name);
|
||||||
// TODO: create_app_meta_mime()
|
// create meta MIME
|
||||||
|
if (fInitError == B_OK) {
|
||||||
|
BPath path;
|
||||||
|
if (path.SetTo(&ref) == B_OK)
|
||||||
|
create_app_meta_mime(path.Path(), false, true, false);
|
||||||
|
}
|
||||||
// Return the error or exit, if there was an error and no error variable
|
// Return the error or exit, if there was an error and no error variable
|
||||||
// has been supplied.
|
// has been supplied.
|
||||||
if (error)
|
if (error)
|
||||||
|
Loading…
Reference in New Issue
Block a user