From 20b3de56573b9e86c6b6041faf684adc8cbb2a45 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sat, 29 Jan 2005 14:23:27 +0000 Subject: examples to where they belong --- (limited to 'libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp') 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 -#include -#include - -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; - -} - -- cgit v0.9.0.2