summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp1
-rw-r--r--libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro2
-rw-r--r--libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp2
-rw-r--r--libopie2/examples/opiecore/odebugdemo/odebugdemo.pro3
4 files changed, 1 insertions, 7 deletions
diff --git a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp
index 6712870..2ee4a65 100644
--- a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp
+++ b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp
@@ -9,25 +9,24 @@ int main( int argc, char** argv )
9 OApplication* app = new OApplication( argc, argv, "MyConfigDemoApplication" ); 9 OApplication* app = new OApplication( argc, argv, "MyConfigDemoApplication" );
10 10
11 OConfigGroupSaver c1( app->config(), "MyGroup" ); 11 OConfigGroupSaver c1( app->config(), "MyGroup" );
12 app->config()->writeEntry( "AnEntry", "InMyGroup" ); 12 app->config()->writeEntry( "AnEntry", "InMyGroup" );
13 { 13 {
14 OConfigGroupSaver c2( c1.config(), "AnotherGroup" ); 14 OConfigGroupSaver c2( c1.config(), "AnotherGroup" );
15 app->config()->writeEntry( "AnEntry", "InAnotherGroup" ); 15 app->config()->writeEntry( "AnEntry", "InAnotherGroup" );
16 } // closing the scope returns to the last group 16 } // closing the scope returns to the last group
17 17
18 app->config()->writeEntry( "AnotherEntry", "InMyGroup" ); 18 app->config()->writeEntry( "AnotherEntry", "InMyGroup" );
19 19
20 // do more stuff ... 20 // do more stuff ...
21 21
22 // in this (special) case it is necessary to manually call OConfig::write() (see below) 22 // in this (special) case it is necessary to manually call OConfig::write() (see below)
23 app->config()->write(); 23 app->config()->write();
24 24
25 // can't delete the app when using the OConfigGroupSaver on top level scope, 25 // can't delete the app when using the OConfigGroupSaver on top level scope,
26 // because the destructor of the OConfigGroupSaver needs an application object 26 // because the destructor of the OConfigGroupSaver needs an application object
27 //delete app; // destructor deletes config which writes changes back to disk 27 //delete app; // destructor deletes config which writes changes back to disk
28 28
29 return 0; 29 return 0;
30 30
31} 31}
32 32
33//#include "moc/oconfigdemo.moc"
diff --git a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro
index 9721e99..b29c106 100644
--- a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro
+++ b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro
@@ -1,20 +1,18 @@
1TEMPLATE = app 1TEMPLATE = app
2CONFIG = qt warn_on 2CONFIG = qt warn_on
3HEADERS = 3HEADERS =
4SOURCES = oconfigdemo.cpp 4SOURCES = oconfigdemo.cpp
5 5
6INCLUDEPATH += $(OPIEDIR)/include 6INCLUDEPATH += $(OPIEDIR)/include
7DEPENDPATH += $(OPIEDIR)/include 7DEPENDPATH += $(OPIEDIR)/include
8LIBS += -lopiecore2 8LIBS += -lopiecore2
9TARGET = oconfigdemo 9TARGET = oconfigdemo
10MOC_DIR = moc
11OBJECTS_DIR = obj
12 10
13!contains( platform, x11 ) { 11!contains( platform, x11 ) {
14 include( $(OPIEDIR)/include.pro ) 12 include( $(OPIEDIR)/include.pro )
15} 13}
16 14
17contains( platform, x11 ) { 15contains( platform, x11 ) {
18 LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib 16 LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
19} 17}
20 18
diff --git a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp b/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp
index c0369ef..b046d28 100644
--- a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp
+++ b/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp
@@ -118,25 +118,25 @@ public slots:
118 void emitFatalOutput() 118 void emitFatalOutput()
119 { 119 {
120 ofatal << "This is a fatal message" << oendl; 120 ofatal << "This is a fatal message" << oendl;
121 } 121 }
122 void emitTBOutput() 122 void emitTBOutput()
123 { 123 {
124 ofatal << "This is a fatal message + backtrace\n" + odBacktrace(); // odBacktrace includes \n 124 ofatal << "This is a fatal message + backtrace\n" + odBacktrace(); // odBacktrace includes \n
125 } 125 }
126 126
127private: 127private:
128 QButtonGroup* g; 128 QButtonGroup* g;
129 int m; 129 int m;
130 QLineEdit* e; 130 QLineEdit* e;
131}; 131};
132 132
133int main( int argc, char** argv ) 133int main( int argc, char** argv )
134{ 134{
135 DemoApp* app = new DemoApp( argc, argv ); 135 DemoApp* app = new DemoApp( argc, argv );
136 app->exec(); 136 app->exec();
137 137
138 return 0; 138 return 0;
139 139
140} 140}
141 141
142#include "moc/odebugdemo.moc" 142#include "odebugdemo.moc"
diff --git a/libopie2/examples/opiecore/odebugdemo/odebugdemo.pro b/libopie2/examples/opiecore/odebugdemo/odebugdemo.pro
index 781d678..e06053c 100644
--- a/libopie2/examples/opiecore/odebugdemo/odebugdemo.pro
+++ b/libopie2/examples/opiecore/odebugdemo/odebugdemo.pro
@@ -1,20 +1,17 @@
1TEMPLATE = app 1TEMPLATE = app
2CONFIG = qt warn_on 2CONFIG = qt warn_on
3HEADERS = 3HEADERS =
4SOURCES = odebugdemo.cpp 4SOURCES = odebugdemo.cpp
5INCLUDEPATH += $(OPIEDIR)/include 5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include 6DEPENDPATH += $(OPIEDIR)/include
7LIBS += -lopiecore2 7LIBS += -lopiecore2
8TARGET = odebugdemo 8TARGET = odebugdemo
9 9
10OBJECTS_DIR = obj
11
12!contains( platform, x11 ) { 10!contains( platform, x11 ) {
13 include( $(OPIEDIR)/include.pro ) 11 include( $(OPIEDIR)/include.pro )
14} 12}
15 13
16contains( platform, x11 ) { 14contains( platform, x11 ) {
17 LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib 15 LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
18} 16}
19 17
20MOC_DIR = moc