Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QTerminationHandler class allows an application to instruct the system on how to handle an abnormal termination. More...
#include <QTerminationHandler>
Inherits QObject.
The QTerminationHandler class allows an application to instruct the system on how to handle an abnormal termination.
While the abnormal termination - ie. crash - of an application is undesirable, sometimes it is unavoidable. By default, Qt Extended displays a generic notification when this occurs that gives no information to the end user as to what caused the crash, and how they could potentially avoid it reoccuring.
The QTerminationHandler class allows an application to register expanded information for display to the user if it crashes. To use the QTerminationHandler class, an application only has to construct it prior to commencing the potentially dangerous operation and destroy it when the termination information is no longer valid.
An application may register as many termination handlers as required, however only the most recently installed termination handler will be used in the case an abnormal termination.
Constructs a QTerminationHandler. If a crash occurs, text will be presented to the user in a theme dictated manner. Additionally, if action is valid, and if either buttonText or buttonIcon are valid the user will have the option of activating a button that causes action to occur.
The QTerminationHandler is a QObject with the given parent.
For example,
QTerminationHandler * myTermHandler = new QTerminationHandler(tr("The message you tried to read caused Acme EMail to crash. Please try viewing the mail in text only mode.", "Restart", ":icon/acmeemail", QtopiaServiceRequest("AcmeEmail", "viewMail()"));
// Open mail
delete myTermHandler;
Constructs a QTerminationHandler. If a crash occurs, action will occur.
For example,
QTerminationHandler * myTermHandler = new QTerminationHandler(QtopiaServiceRequest("AcmeEmail", "showCrashScreen()"));
// Open mail
delete myTermHandler;
Destroys the QTerminationHandler instance. This automatically unregisters the handler from the system.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |