Diffstat (limited to 'libopie2/examples/opiecore/oconfigdemo') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/examples/opiecore/oconfigdemo/.cvsignore | 8 | ||||
-rw-r--r-- | libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp | 32 | ||||
-rw-r--r-- | libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro | 18 |
3 files changed, 0 insertions, 58 deletions
diff --git a/libopie2/examples/opiecore/oconfigdemo/.cvsignore b/libopie2/examples/opiecore/oconfigdemo/.cvsignore deleted file mode 100644 index db3635b..0000000 --- a/libopie2/examples/opiecore/oconfigdemo/.cvsignore +++ b/dev/null @@ -1,8 +0,0 @@ -oconfigdemo -Makefile* -obj -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp deleted file mode 100644 index 2ee4a65..0000000 --- a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp +++ b/dev/null @@ -1,32 +0,0 @@ -#include <opie2/oapplication.h> -#include <opie2/oconfig.h> -#include <qpe/config.h> - -using namespace Opie::Core; - -int main( int argc, char** argv ) -{ - OApplication* app = new OApplication( argc, argv, "MyConfigDemoApplication" ); - - OConfigGroupSaver c1( app->config(), "MyGroup" ); - app->config()->writeEntry( "AnEntry", "InMyGroup" ); - { - OConfigGroupSaver c2( c1.config(), "AnotherGroup" ); - app->config()->writeEntry( "AnEntry", "InAnotherGroup" ); - } // closing the scope returns to the last group - - app->config()->writeEntry( "AnotherEntry", "InMyGroup" ); - - // do more stuff ... - - // in this (special) case it is necessary to manually call OConfig::write() (see below) - app->config()->write(); - - // can't delete the app when using the OConfigGroupSaver on top level scope, - // because the destructor of the OConfigGroupSaver needs an application object - //delete app; // destructor deletes config which writes changes back to disk - - return 0; - -} - diff --git a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro deleted file mode 100644 index b29c106..0000000 --- a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro +++ b/dev/null @@ -1,18 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = oconfigdemo.cpp - -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lopiecore2 -TARGET = oconfigdemo - -!contains( platform, x11 ) { - include( $(OPIEDIR)/include.pro ) -} - -contains( platform, x11 ) { - LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib -} - |