summaryrefslogtreecommitdiff
path: root/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp2
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:
QPushButton* tb = new QPushButton( "Emit a Fatal Backtrace!", vbox );
connect( tb, SIGNAL( clicked() ), this, SLOT( emitTBOutput() ) );
info->show();
warn->show();
error->show();
fatal->show();
tb->show();
g->show();
hbox->show();
e->show();
vbox->show();
showMainWidget( vbox );
}
public slots:
void chooseMethod(int method)
{
m = method;
qDebug( "choosing method: %d", method );
OConfig* g = OGlobal::config();
g->setGroup( "General" );
g->writeEntry( "debugMode", m );
e->setText( OGlobalSettings::debugOutput() );
+ g->write();
}
void updateDebugOutput()
{
OConfig* g = OGlobal::config();
g->setGroup( "General" );
g->writeEntry( "debugOutput"+QString::number(OGlobalSettings::debugMode()), e->text() );
+ g->write();
}
void emitInfoOutput()
{
odebug << "This is a debug message" << oendl;
}
void emitWarningOutput()
{
owarn << "This is a warning message" << oendl;
}
void emitErrorOutput()
{
oerr << "This is an errror message" << oendl;
}
void emitFatalOutput()
{
ofatal << "This is a fatal message" << oendl;
}
void emitTBOutput()
{
ofatal << "This is a fatal message + backtrace\n" + odBacktrace(); // odBacktrace includes \n
}
private:
QButtonGroup* g;