Diffstat (limited to 'libopie2/opiecore/oapplication.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiecore/oapplication.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/libopie2/opiecore/oapplication.cpp b/libopie2/opiecore/oapplication.cpp index ce26420..7a6c174 100644 --- a/libopie2/opiecore/oapplication.cpp +++ b/libopie2/opiecore/oapplication.cpp | |||
@@ -41,25 +41,25 @@ class OApplicationPrivate | |||
41 | { | 41 | { |
42 | public: | 42 | public: |
43 | OApplicationPrivate() {}; | 43 | OApplicationPrivate() {}; |
44 | ~OApplicationPrivate() {}; | 44 | ~OApplicationPrivate() {}; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | /**************************************************************************************************/ | 47 | /**************************************************************************************************/ |
48 | /* OApplication | 48 | /* OApplication |
49 | /**************************************************************************************************/ | 49 | /**************************************************************************************************/ |
50 | 50 | ||
51 | 51 | ||
52 | OApplication::OApplication( int& argc, char** argv, const QCString& rAppName ) | 52 | OApplication::OApplication( int& argc, char** argv, const QCString& rAppName ) |
53 | :OApplicationBaseClass( argc, argv ), | 53 | :QPEApplication( argc, argv ), |
54 | _appname( rAppName ), | 54 | _appname( rAppName ), |
55 | _config( 0 ) | 55 | _config( 0 ) |
56 | { | 56 | { |
57 | init(); | 57 | init(); |
58 | } | 58 | } |
59 | 59 | ||
60 | 60 | ||
61 | OApplication::~OApplication() | 61 | OApplication::~OApplication() |
62 | { | 62 | { |
63 | delete d; | 63 | delete d; |
64 | if ( _config ) | 64 | if ( _config ) |
65 | delete _config; | 65 | delete _config; |
@@ -84,38 +84,27 @@ void OApplication::init() | |||
84 | d = new OApplicationPrivate(); | 84 | d = new OApplicationPrivate(); |
85 | if ( !OApplication::_instance ) | 85 | if ( !OApplication::_instance ) |
86 | { | 86 | { |
87 | OApplication::_instance = this; | 87 | OApplication::_instance = this; |
88 | } | 88 | } |
89 | else | 89 | else |
90 | { | 90 | { |
91 | qFatal( "OApplication: Can't create more than one OApplication object. Aborting." ); | 91 | qFatal( "OApplication: Can't create more than one OApplication object. Aborting." ); |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
95 | 95 | ||
96 | void OApplication::setMainWidget( QWidget* widget ) | ||
97 | { | ||
98 | showMainWidget( widget ); | ||
99 | } | ||
100 | |||
101 | |||
102 | void OApplication::showMainWidget( QWidget* widget, bool nomax ) | 96 | void OApplication::showMainWidget( QWidget* widget, bool nomax ) |
103 | { | 97 | { |
104 | #ifdef Q_WS_QWS | ||
105 | QPEApplication::showMainWidget( widget, nomax ); | 98 | QPEApplication::showMainWidget( widget, nomax ); |
106 | #else | ||
107 | QApplication::setMainWidget( widget ); | ||
108 | widget->show(); | ||
109 | #endif | ||
110 | widget->setCaption( _appname ); | 99 | widget->setCaption( _appname ); |
111 | } | 100 | } |
112 | 101 | ||
113 | 102 | ||
114 | void OApplication::setTitle( const QString& title ) const | 103 | void OApplication::setTitle( const QString& title ) const |
115 | { | 104 | { |
116 | if ( mainWidget() ) | 105 | if ( mainWidget() ) |
117 | { | 106 | { |
118 | if ( !title.isNull() ) | 107 | if ( !title.isNull() ) |
119 | mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); | 108 | mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); |
120 | else | 109 | else |
121 | mainWidget()->setCaption( _appname ); | 110 | mainWidget()->setCaption( _appname ); |