summaryrefslogtreecommitdiff
path: root/libopie2
Side-by-side diff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oapplication.cpp8
-rw-r--r--libopie2/opiecore/oapplication.h6
2 files changed, 13 insertions, 1 deletions
diff --git a/libopie2/opiecore/oapplication.cpp b/libopie2/opiecore/oapplication.cpp
index ac7cd5a..0ce61d8 100644
--- a/libopie2/opiecore/oapplication.cpp
+++ b/libopie2/opiecore/oapplication.cpp
@@ -36,49 +36,55 @@
using namespace Opie::Core;
OApplication* OApplication::_instance = 0;
/**************************************************************************************************
* OApplicationPrivate
**************************************************************************************************/
namespace Opie {
namespace Core {
namespace Internal {
class OApplicationPrivate
{
public:
OApplicationPrivate() {};
~OApplicationPrivate() {};
};
}
/**************************************************************************************************
* OApplication
**************************************************************************************************/
-
+OApplication::OApplication( int& argc, char** argv, Type type )
+ :QPEApplication( argc, argv, type ),
+ _appname( QString::null ),
+ _config( 0 )
+{
+ init();
+}
OApplication::OApplication( int& argc, char** argv, const QCString& rAppName )
:QPEApplication( argc, argv ),
_appname( rAppName ),
_config( 0 )
{
init();
}
OApplication::~OApplication()
{
delete d;
if ( _config )
delete _config;
OApplication::_instance = 0;
// after deconstruction of the one-and-only application object,
// the construction of another object is allowed
}
OConfig* OApplication::config()
{
if ( !_config )
diff --git a/libopie2/opiecore/oapplication.h b/libopie2/opiecore/oapplication.h
index 337fe5e..d34e6b1 100644
--- a/libopie2/opiecore/oapplication.h
+++ b/libopie2/opiecore/oapplication.h
@@ -28,48 +28,54 @@
*/
#ifndef OAPPLICATION_H
#define OAPPLICATION_H
#define oApp Opie::Core::OApplication::oApplication()
#include <qpe/qpeapplication.h>
namespace Opie {
namespace Core {
namespace Internal {
class OApplicationPrivate;
} // private class
class OConfig;
class OApplication : public QPEApplication
{
Q_OBJECT
public:
+
+ /**
+ * Constructor. Compatible to QPEApplication
+ */
+ OApplication( int& argc, char** argv, Type type=GuiClient);
+
/**
* Constructor. Parses command-line arguments and sets the window caption.
*
* @param rAppName application name. Will be used for finding the
* associated message, icon and configuration files
*
*/
OApplication( int& argc, char** argv, const QCString& rAppName );
/**
* Destructor. Destroys the application object and its children.
*/
virtual ~OApplication();
/**
* @returns the process-wide application object
*
* This is similar to the global @ref QApplication pointer qApp. It
* allows access to the single global OApplication object, since
* more than one cannot be created in the same application. It
* saves you the trouble of having to pass the pointer explicitly
* to every function that may require it.
*/
static OApplication* oApplication() { return _instance; };
/**
* Returns the application name as given during creation.