Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

ApplicationTerminationHandler Class Reference
[QtBaseModule]

The ApplicationTerminationHandler class allows tasks to be notified, and possibly filter, when an application terminates. More...

    #include <ApplicationTerminationHandler>

Inherits QObject.

Public Functions

Additional Inherited Members


Detailed Description

The ApplicationTerminationHandler class allows tasks to be notified, and possibly filter, when an application terminates.

The ApplicationTerminationHandler provides a Qt Extended Server Task interface. Qt Extended Server Tasks are documented in full in the QtopiaServerApplication class documentation.

Note: This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.

When an application terminates, the ApplicationLauncher notifies all tasks, in order, that implement the ApplicationTerminationHandler interface. A task that implements the ApplicationTeminationHandler interface can filter the termination notification by returning true from its terminated() notification method. Filtering a termination will prevent subsequently ordered tasks from being notified.

Regardless of whether or not a task is filtered, the ApplicationLauncher class will still emit the global ApplicationLauncher::applicationTerminated() signal, albeit with the filtered parameter set to true.

Termination handlers can be used to hide the termination of "system" applications from the user, or to implement custom termination notices. The QTerminationHandler class, for example, uses a server side termination handler to display a more descriptive crash message when an application abnormally exits.


Member Function Documentation

ApplicationTerminationHandler::ApplicationTerminationHandler ( QObject * parent = 0 )

Construct a new ApplicationTerminationHandler interface with the given parent.

bool ApplicationTerminationHandler::terminated ( const QString & appName, ApplicationTypeLauncher::TerminationReason reason )   [pure virtual]

Invoked when an application terminates. appName is the name of the application that terminated and reason is the way in which it terminated.

Returning false from this method allows the termination notification to continue to propagate to other ApplicationTerminationHandler instances. Returning true stops further propagation. Implementors should only return true if they intend to notify the user of the termination, or if they have determined that notification is not required.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3