Diffstat (limited to 'libopie2/examples/opiecore/oconfigdemo') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp | 1 | ||||
-rw-r--r-- | libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro | 2 |
2 files changed, 0 insertions, 3 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 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG = qt warn_on | 2 | CONFIG = qt warn_on |
3 | HEADERS = | 3 | HEADERS = |
4 | SOURCES = oconfigdemo.cpp | 4 | SOURCES = oconfigdemo.cpp |
5 | 5 | ||
6 | INCLUDEPATH += $(OPIEDIR)/include | 6 | INCLUDEPATH += $(OPIEDIR)/include |
7 | DEPENDPATH += $(OPIEDIR)/include | 7 | DEPENDPATH += $(OPIEDIR)/include |
8 | LIBS += -lopiecore2 | 8 | LIBS += -lopiecore2 |
9 | TARGET = oconfigdemo | 9 | TARGET = oconfigdemo |
10 | MOC_DIR = moc | ||
11 | OBJECTS_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 | ||
17 | contains( platform, x11 ) { | 15 | contains( platform, x11 ) { |
18 | LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib | 16 | LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib |
19 | } | 17 | } |
20 | 18 | ||