summaryrefslogtreecommitdiffstats
path: root/src/gui/s60framework/qs60mainapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/s60framework/qs60mainapplication.cpp')
-rw-r--r--src/gui/s60framework/qs60mainapplication.cpp81
1 files changed, 56 insertions, 25 deletions
diff --git a/src/gui/s60framework/qs60mainapplication.cpp b/src/gui/s60framework/qs60mainapplication.cpp
index f12ed1f2e7..54fb3b1e7f 100644
--- a/src/gui/s60framework/qs60mainapplication.cpp
+++ b/src/gui/s60framework/qs60mainapplication.cpp
@@ -41,53 +41,86 @@
// INCLUDE FILES
#include <exception>
-#include "qs60maindocument_p.h"
+#include "qs60maindocument.h"
#include "qs60mainapplication_p.h"
+#include "qs60mainapplication.h"
#include <bautils.h>
#include <coemain.h>
QT_BEGIN_NAMESPACE
/**
- * factory function to create the QtS60Main application class
+ * factory function to create the QS60Main application class
*/
-CApaApplication* NewApplication()
+CApaApplication *newS60Application()
{
return new QS60MainApplication;
}
-// ============================ MEMBER FUNCTIONS ===============================
+_LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main.rsc");
+/*!
+ * \class QS60MainApplication
+ * \obsolete
+ * \since 4.6
+ * \brief Helper class for S60 migration
+ *
+ * The QS60MainApplication provides a helper class for use in migrating from existing S60 based
+ * applications to Qt based applications. It is used in the exact same way as the
+ * \c CAknApplication class from Symbian, but internally provides extensions used by Qt.
+ *
+ * When modifying old S60 applications that rely on implementing functions in \c CAknApplication,
+ * the class should be modified to inherit from this class instead of \c CAknApplication. Then the
+ * application can choose to override only certain functions. To make Qt use the custom application
+ * objects, pass a factory function to
+ * QApplication::QApplication(QApplication::QS60MainApplicationFactory, int &, char **).
+ *
+ * For more information on \c CAknApplication, please see the S60 documentation.
+ *
+ * Unlike other Qt classes, QS60MainApplication behaves like an S60 class, and can throw Symbian
+ * leaves.
+ *
+ * \sa QS60MainDocument, QS60MainAppUi, QApplication::QApplication(QApplication::QS60MainApplicationFactory, int &, char **)
+ */
-_LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main.rsc");
+/*!
+ * \brief Contructs an instance of QS60MainApplication.
+ */
+QS60MainApplication::QS60MainApplication()
+{
+}
-// -----------------------------------------------------------------------------
-// QS60MainApplication::CreateDocumentL()
-// Creates CApaDocument object
-// -----------------------------------------------------------------------------
-//
-CApaDocument* QS60MainApplication::CreateDocumentL()
+/*!
+ * \brief Destroys the QS60MainApplication.
+ */
+QS60MainApplication::~QS60MainApplication()
+{
+}
+
+/*!
+ * \brief Creates an instance of QS60MainDocument.
+ *
+ * \sa QS60MainDocument
+ */
+CApaDocument *QS60MainApplication::CreateDocumentL()
{
// Create an QtS60Main document, and return a pointer to it
- return (static_cast<CApaDocument*>(QS60MainDocument::NewL(*this)));
+ return new (ELeave) QS60MainDocument(*this);
}
-// -----------------------------------------------------------------------------
-// QS60MainApplication::AppDllUid()
-// Returns application UID
-// -----------------------------------------------------------------------------
-//
+
+/*!
+ * \brief Returns the UID of the application.
+ */
TUid QS60MainApplication::AppDllUid() const
{
// Return the UID for the QtS60Main application
- return ProcessUid();
+ return RProcess().SecureId().operator TUid();
}
-// -----------------------------------------------------------------------------
-// QS60MainApplication::ResourceFileName()
-// Returns application resource filename
-// -----------------------------------------------------------------------------
-//
+/*!
+ * \brief Returns the resource file name.
+ */
TFileName QS60MainApplication::ResourceFileName() const
{
TFindFile finder(iCoeEnv->FsSession());
@@ -98,5 +131,3 @@ TFileName QS60MainApplication::ResourceFileName() const
}
QT_END_NAMESPACE
-
-// End of File