Diffstat (limited to 'libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp b/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp index 74886fa..e8bf04f 100644 --- a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp +++ b/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp | |||
@@ -71,54 +71,56 @@ public: | |||
71 | QPushButton* tb = new QPushButton( "Emit a Fatal Backtrace!", vbox ); | 71 | QPushButton* tb = new QPushButton( "Emit a Fatal Backtrace!", vbox ); |
72 | connect( tb, SIGNAL( clicked() ), this, SLOT( emitTBOutput() ) ); | 72 | connect( tb, SIGNAL( clicked() ), this, SLOT( emitTBOutput() ) ); |
73 | 73 | ||
74 | info->show(); | 74 | info->show(); |
75 | warn->show(); | 75 | warn->show(); |
76 | error->show(); | 76 | error->show(); |
77 | fatal->show(); | 77 | fatal->show(); |
78 | tb->show(); | 78 | tb->show(); |
79 | g->show(); | 79 | g->show(); |
80 | hbox->show(); | 80 | hbox->show(); |
81 | e->show(); | 81 | e->show(); |
82 | vbox->show(); | 82 | vbox->show(); |
83 | showMainWidget( vbox ); | 83 | showMainWidget( vbox ); |
84 | } | 84 | } |
85 | 85 | ||
86 | public slots: | 86 | public slots: |
87 | void chooseMethod(int method) | 87 | void chooseMethod(int method) |
88 | { | 88 | { |
89 | m = method; | 89 | m = method; |
90 | qDebug( "choosing method: %d", method ); | 90 | qDebug( "choosing method: %d", method ); |
91 | OConfig* g = OGlobal::config(); | 91 | OConfig* g = OGlobal::config(); |
92 | g->setGroup( "General" ); | 92 | g->setGroup( "General" ); |
93 | g->writeEntry( "debugMode", m ); | 93 | g->writeEntry( "debugMode", m ); |
94 | e->setText( OGlobalSettings::debugOutput() ); | 94 | e->setText( OGlobalSettings::debugOutput() ); |
95 | g->write(); | ||
95 | } | 96 | } |
96 | void updateDebugOutput() | 97 | void updateDebugOutput() |
97 | { | 98 | { |
98 | OConfig* g = OGlobal::config(); | 99 | OConfig* g = OGlobal::config(); |
99 | g->setGroup( "General" ); | 100 | g->setGroup( "General" ); |
100 | g->writeEntry( "debugOutput"+QString::number(OGlobalSettings::debugMode()), e->text() ); | 101 | g->writeEntry( "debugOutput"+QString::number(OGlobalSettings::debugMode()), e->text() ); |
102 | g->write(); | ||
101 | } | 103 | } |
102 | void emitInfoOutput() | 104 | void emitInfoOutput() |
103 | { | 105 | { |
104 | odebug << "This is a debug message" << oendl; | 106 | odebug << "This is a debug message" << oendl; |
105 | } | 107 | } |
106 | void emitWarningOutput() | 108 | void emitWarningOutput() |
107 | { | 109 | { |
108 | owarn << "This is a warning message" << oendl; | 110 | owarn << "This is a warning message" << oendl; |
109 | } | 111 | } |
110 | void emitErrorOutput() | 112 | void emitErrorOutput() |
111 | { | 113 | { |
112 | oerr << "This is an errror message" << oendl; | 114 | oerr << "This is an errror message" << oendl; |
113 | } | 115 | } |
114 | void emitFatalOutput() | 116 | void emitFatalOutput() |
115 | { | 117 | { |
116 | ofatal << "This is a fatal message" << oendl; | 118 | ofatal << "This is a fatal message" << oendl; |
117 | } | 119 | } |
118 | void emitTBOutput() | 120 | void emitTBOutput() |
119 | { | 121 | { |
120 | ofatal << "This is a fatal message + backtrace\n" + odBacktrace(); // odBacktrace includes \n | 122 | ofatal << "This is a fatal message + backtrace\n" + odBacktrace(); // odBacktrace includes \n |
121 | } | 123 | } |
122 | 124 | ||
123 | private: | 125 | private: |
124 | QButtonGroup* g; | 126 | QButtonGroup* g; |