summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/oapplication.cpp
authormickeyl <mickeyl>2003-12-02 15:29:06 (UTC)
committer mickeyl <mickeyl>2003-12-02 15:29:06 (UTC)
commite215d4b2bc542b557913ba3dcd57fd20a5a2a0fe (patch) (unidiff)
tree8bb36647649cebf7c204ce58adcb820f4f0c19d6 /libopie2/opiecore/oapplication.cpp
parent7a7683d435cfbb4fa2d6ed99fd4a94d388402aec (diff)
downloadopie-e215d4b2bc542b557913ba3dcd57fd20a5a2a0fe.zip
opie-e215d4b2bc542b557913ba3dcd57fd20a5a2a0fe.tar.gz
opie-e215d4b2bc542b557913ba3dcd57fd20a5a2a0fe.tar.bz2
revert the changes approaching to compile libopie2 under X11
it broke signals and slots and has to be done like zecke did it with libqpe
Diffstat (limited to 'libopie2/opiecore/oapplication.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/oapplication.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opiecore/oapplication.cpp b/libopie2/opiecore/oapplication.cpp
index 12f33cc..c3cacce 100644
--- a/libopie2/opiecore/oapplication.cpp
+++ b/libopie2/opiecore/oapplication.cpp
@@ -33,49 +33,49 @@
33#include <opie2/odebug.h> 33#include <opie2/odebug.h>
34 34
35#include <signal.h> 35#include <signal.h>
36#include <stdio.h> 36#include <stdio.h>
37 37
38OApplication* OApplication::_instance = 0; 38OApplication* OApplication::_instance = 0;
39 39
40/**************************************************************************************************/ 40/**************************************************************************************************/
41/* OApplicationPrivate 41/* OApplicationPrivate
42/**************************************************************************************************/ 42/**************************************************************************************************/
43 43
44class OApplicationPrivate 44class OApplicationPrivate
45{ 45{
46 public: 46 public:
47 OApplicationPrivate() {}; 47 OApplicationPrivate() {};
48 ~OApplicationPrivate() {}; 48 ~OApplicationPrivate() {};
49}; 49};
50 50
51/**************************************************************************************************/ 51/**************************************************************************************************/
52/* OApplication 52/* OApplication
53/**************************************************************************************************/ 53/**************************************************************************************************/
54 54
55 55
56OApplication::OApplication( int& argc, char** argv, const QCString& rAppName ) 56OApplication::OApplication( int& argc, char** argv, const QCString& rAppName )
57 :OpieApplication( argc, argv ), 57 :QPEApplication( argc, argv ),
58 _appname( rAppName ), 58 _appname( rAppName ),
59 _config( 0 ) 59 _config( 0 )
60{ 60{
61 init(); 61 init();
62} 62}
63 63
64 64
65OApplication::~OApplication() 65OApplication::~OApplication()
66{ 66{
67 delete d; 67 delete d;
68 if ( _config ) 68 if ( _config )
69 delete _config; 69 delete _config;
70 OApplication::_instance = 0; 70 OApplication::_instance = 0;
71 // after deconstruction of the one-and-only application object, 71 // after deconstruction of the one-and-only application object,
72 // the construction of another object is allowed 72 // the construction of another object is allowed
73} 73}
74 74
75 75
76OConfig* OApplication::config() 76OConfig* OApplication::config()
77{ 77{
78 if ( !_config ) 78 if ( !_config )
79 { 79 {
80 _config = new OConfig( _appname ); 80 _config = new OConfig( _appname );
81 } 81 }
@@ -87,40 +87,40 @@ void OApplication::init()
87{ 87{
88 d = new OApplicationPrivate(); 88 d = new OApplicationPrivate();
89 if ( !OApplication::_instance ) 89 if ( !OApplication::_instance )
90 { 90 {
91 OApplication::_instance = this; 91 OApplication::_instance = this;
92 92
93 /* register SIGSEGV handler to give programs an option 93 /* register SIGSEGV handler to give programs an option
94 * to exit gracefully, e.g. save or close devices or files. 94 * to exit gracefully, e.g. save or close devices or files.
95 struct sigaction sa; 95 struct sigaction sa;
96 sa.sa_handler = ( void (*)(int) ) &segv_handler; 96 sa.sa_handler = ( void (*)(int) ) &segv_handler;
97 sa.sa_flags = SA_SIGINFO | SA_RESTART; 97 sa.sa_flags = SA_SIGINFO | SA_RESTART;
98 sigemptyset(&sa.sa_mask); 98 sigemptyset(&sa.sa_mask);
99 sigaction(SIGSEGV, &sa, NULL); 99 sigaction(SIGSEGV, &sa, NULL);
100 */ 100 */
101 } 101 }
102 else 102 else
103 { 103 {
104 qFatal( "OApplication: Can't create more than one OApplication object. Aborting." ); 104 qFatal( "OApplication: Can't create more than one OApplication object. Aborting." );
105 } 105 }
106} 106}
107 107
108 108
109void OApplication::showMainWidget( QWidget* widget, bool nomax ) 109void OApplication::showMainWidget( QWidget* widget, bool nomax )
110{ 110{
111 OpieApplication::showMainWidget( widget, nomax ); 111 QPEApplication::showMainWidget( widget, nomax );
112 widget->setCaption( _appname ); 112 widget->setCaption( _appname );
113} 113}
114 114
115 115
116void OApplication::setTitle( const QString& title ) const 116void OApplication::setTitle( const QString& title ) const
117{ 117{
118 if ( mainWidget() ) 118 if ( mainWidget() )
119 { 119 {
120 if ( !title.isNull() ) 120 if ( !title.isNull() )
121 mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); 121 mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title );
122 else 122 else
123 mainWidget()->setCaption( _appname ); 123 mainWidget()->setCaption( _appname );
124 } 124 }
125} 125}
126 126